Show / Hide Table of Contents

    Class HttpManagerExtensions

    This is an extension implementation of the most common methods on the HttpManager class.

    Inheritance
    System.Object
    HttpManagerExtensions
    Namespace: Cuemon.Net.Http
    Assembly: Cuemon.Net.dll
    Syntax
    public static class HttpManagerExtensions

    Methods

    | Improve this Doc

    HttpAsync(Uri, Action<HttpRequestOptions>)

    Send a request as an asynchronous operation.

    Declaration
    public static Task<HttpResponseMessage> HttpAsync(this Uri location, Action<HttpRequestOptions> setup)
    Parameters
    Type Name Description
    System.Uri location

    The System.Uri to request.

    System.Action<HttpRequestOptions> setup

    The HttpRequestOptions which need to be configured.

    Returns
    Type Description
    System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage>

    The task object representing the asynchronous operation.

    | Improve this Doc

    HttpAsync(Uri, HttpMethod, MediaTypeHeaderValue, Stream, CancellationToken)

    Send a request as an asynchronous operation.

    Declaration
    public static Task<HttpResponseMessage> HttpAsync(this Uri location, HttpMethod method, MediaTypeHeaderValue contentType, Stream content, CancellationToken ct = default(CancellationToken))
    Parameters
    Type Name Description
    System.Uri location

    The System.Uri to request.

    System.Net.Http.HttpMethod method

    The HTTP method.

    System.Net.Http.Headers.MediaTypeHeaderValue contentType

    The Content-Type header of the HTTP request sent to the server.

    System.IO.Stream content

    The HTTP request content sent to the server.

    System.Threading.CancellationToken ct

    The cancellation token to cancel operation.

    Returns
    Type Description
    System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage>

    The task object representing the asynchronous operation.

    | Improve this Doc

    HttpAsync(Uri, HttpMethod, String, Stream, CancellationToken)

    Send a request as an asynchronous operation.

    Declaration
    public static Task<HttpResponseMessage> HttpAsync(this Uri location, HttpMethod method, string contentType, Stream content, CancellationToken ct = default(CancellationToken))
    Parameters
    Type Name Description
    System.Uri location

    The System.Uri to request.

    System.Net.Http.HttpMethod method

    The HTTP method.

    System.String contentType

    The Content-Type header of the HTTP request sent to the server.

    System.IO.Stream content

    The HTTP request content sent to the server.

    System.Threading.CancellationToken ct

    The cancellation token to cancel operation.

    Returns
    Type Description
    System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage>

    The task object representing the asynchronous operation.

    | Improve this Doc

    HttpDeleteAsync(Uri, CancellationToken)

    Send a DELETE request to the specified Uri as an asynchronous operation.

    Declaration
    public static Task<HttpResponseMessage> HttpDeleteAsync(this Uri location, CancellationToken ct = default(CancellationToken))
    Parameters
    Type Name Description
    System.Uri location

    The System.Uri to request.

    System.Threading.CancellationToken ct

    The cancellation token to cancel operation.

    Returns
    Type Description
    System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage>

    The task object representing the asynchronous operation.

    | Improve this Doc

    HttpGetAsync(Uri, CancellationToken)

    Send a GET request to the specified Uri as an asynchronous operation.

    Declaration
    public static Task<HttpResponseMessage> HttpGetAsync(this Uri location, CancellationToken ct = default(CancellationToken))
    Parameters
    Type Name Description
    System.Uri location

    The System.Uri to request.

    System.Threading.CancellationToken ct

    The cancellation token to cancel operation.

    Returns
    Type Description
    System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage>

    The task object representing the asynchronous operation.

    | Improve this Doc

    HttpHeadAsync(Uri, CancellationToken)

    Send a HEAD request to the specified Uri as an asynchronous operation.

    Declaration
    public static Task<HttpResponseMessage> HttpHeadAsync(this Uri location, CancellationToken ct = default(CancellationToken))
    Parameters
    Type Name Description
    System.Uri location

    The System.Uri to request.

    System.Threading.CancellationToken ct

    The cancellation token to cancel operation.

    Returns
    Type Description
    System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage>

    The task object representing the asynchronous operation.

    | Improve this Doc

    HttpOptionsAsync(Uri, CancellationToken)

    Send an OPTIONS request to the specified Uri as an asynchronous operation.

    Declaration
    public static Task<HttpResponseMessage> HttpOptionsAsync(this Uri location, CancellationToken ct = default(CancellationToken))
    Parameters
    Type Name Description
    System.Uri location

    The System.Uri to request.

    System.Threading.CancellationToken ct

    The cancellation token to cancel operation.

    Returns
    Type Description
    System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage>

    The task object representing the asynchronous operation.

    | Improve this Doc

    HttpPatchAsync(Uri, MediaTypeHeaderValue, Stream, CancellationToken)

    Send a PATCH request to the specified Uri as an asynchronous operation.

    Declaration
    public static Task<HttpResponseMessage> HttpPatchAsync(this Uri location, MediaTypeHeaderValue contentType, Stream content, CancellationToken ct = default(CancellationToken))
    Parameters
    Type Name Description
    System.Uri location

    The System.Uri to request.

    System.Net.Http.Headers.MediaTypeHeaderValue contentType

    The Content-Type header of the HTTP request sent to the server.

    System.IO.Stream content

    The HTTP request content sent to the server.

    System.Threading.CancellationToken ct

    The cancellation token to cancel operation.

    Returns
    Type Description
    System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage>

    The task object representing the asynchronous operation.

    | Improve this Doc

    HttpPatchAsync(Uri, String, Stream, CancellationToken)

    Send a PATCH request to the specified Uri as an asynchronous operation.

    Declaration
    public static Task<HttpResponseMessage> HttpPatchAsync(this Uri location, string contentType, Stream content, CancellationToken ct = default(CancellationToken))
    Parameters
    Type Name Description
    System.Uri location

    The System.Uri to request.

    System.String contentType

    The Content-Type header of the HTTP request sent to the server.

    System.IO.Stream content

    The HTTP request content sent to the server.

    System.Threading.CancellationToken ct

    The cancellation token to cancel operation.

    Returns
    Type Description
    System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage>

    The task object representing the asynchronous operation.

    | Improve this Doc

    HttpPostAsync(Uri, MediaTypeHeaderValue, Stream, CancellationToken)

    Send a POST request to the specified Uri as an asynchronous operation.

    Declaration
    public static Task<HttpResponseMessage> HttpPostAsync(this Uri location, MediaTypeHeaderValue contentType, Stream content, CancellationToken ct = default(CancellationToken))
    Parameters
    Type Name Description
    System.Uri location

    The System.Uri to request.

    System.Net.Http.Headers.MediaTypeHeaderValue contentType

    The Content-Type header of the HTTP request sent to the server.

    System.IO.Stream content

    The HTTP request content sent to the server.

    System.Threading.CancellationToken ct

    The cancellation token to cancel operation.

    Returns
    Type Description
    System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage>

    The task object representing the asynchronous operation.

    | Improve this Doc

    HttpPostAsync(Uri, String, Stream, CancellationToken)

    Send a POST request to the specified Uri as an asynchronous operation.

    Declaration
    public static Task<HttpResponseMessage> HttpPostAsync(this Uri location, string contentType, Stream content, CancellationToken ct = default(CancellationToken))
    Parameters
    Type Name Description
    System.Uri location

    The System.Uri to request.

    System.String contentType

    The Content-Type header of the HTTP request sent to the server.

    System.IO.Stream content

    The HTTP request content sent to the server.

    System.Threading.CancellationToken ct

    The cancellation token to cancel operation.

    Returns
    Type Description
    System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage>

    The task object representing the asynchronous operation.

    | Improve this Doc

    HttpPutAsync(Uri, MediaTypeHeaderValue, Stream, CancellationToken)

    Send a PUT request to the specified Uri as an asynchronous operation.

    Declaration
    public static Task<HttpResponseMessage> HttpPutAsync(this Uri location, MediaTypeHeaderValue contentType, Stream content, CancellationToken ct = default(CancellationToken))
    Parameters
    Type Name Description
    System.Uri location

    The System.Uri to request.

    System.Net.Http.Headers.MediaTypeHeaderValue contentType

    The Content-Type header of the HTTP request sent to the server.

    System.IO.Stream content

    The HTTP request content sent to the server.

    System.Threading.CancellationToken ct

    The cancellation token to cancel operation.

    Returns
    Type Description
    System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage>

    The task object representing the asynchronous operation.

    | Improve this Doc

    HttpPutAsync(Uri, String, Stream, CancellationToken)

    Send a PUT request to the specified Uri as an asynchronous operation.

    Declaration
    public static Task<HttpResponseMessage> HttpPutAsync(this Uri location, string contentType, Stream content, CancellationToken ct = default(CancellationToken))
    Parameters
    Type Name Description
    System.Uri location

    The System.Uri to request.

    System.String contentType

    The Content-Type header of the HTTP request sent to the server.

    System.IO.Stream content

    The HTTP request content sent to the server.

    System.Threading.CancellationToken ct

    The cancellation token to cancel operation.

    Returns
    Type Description
    System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage>

    The task object representing the asynchronous operation.

    | Improve this Doc

    HttpTraceAsync(Uri, CancellationToken)

    Send a TRACE request to the specified Uri as an asynchronous operation.

    Declaration
    public static Task<HttpResponseMessage> HttpTraceAsync(this Uri location, CancellationToken ct = default(CancellationToken))
    Parameters
    Type Name Description
    System.Uri location

    The System.Uri to request.

    System.Threading.CancellationToken ct

    The cancellation token to cancel operation.

    Returns
    Type Description
    System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage>

    The task object representing the asynchronous operation.

    • Improve this Doc
    • View Source
    Back to top Copyright 2008-2018 Weubphoria. All rights reserved.
    Generated by DocFX