System.Net.Http.HttpClient
Provides a base class for sending HTTP requests and receiving HTTP responses from a resource identified by a URI.
Gets or sets the base address of Uniform Resource Identifier (URI) of the Internet resource used when sending requests.
Gets the headers which should be sent with each request.
Gets or sets the maximum number of bytes to buffer when reading the response content.
Gets or sets the number of milliseconds to wait before the request times out.
public HttpClient()
Initializes a new instance of the HttpClient class.
Initializes a new instance of the HttpClient class with a specific handler.
Cancel all pending requests on this instance.
Send a DELETE request to the specified Uri as an asynchronous operation.
Send a DELETE request to the specified Uri as an asynchronous operation.
public Task<HttpResponseMessage> DeleteAsync(string requestUri, CancellationToken cancellationToken)
Send a GET request to the specified Uri as an asynchronous operation.
Send a GET request to the specified Uri as an asynchronous operation.
public Task<HttpResponseMessage> GetAsync(string requestUri, HttpCompletionOption completionOption, CancellationToken cancellationToken)
public Task<HttpResponseMessage> GetAsync(Uri requestUri, HttpCompletionOption completionOption, CancellationToken cancellationToken)
Send a POST request to the specified Uri as an asynchronous operation.
Send a POST request to the specified Uri as an asynchronous operation.
public Task<HttpResponseMessage> PostAsync(string requestUri, HttpContent content, CancellationToken cancellationToken)
public Task<HttpResponseMessage> PostAsync(Uri requestUri, HttpContent content, CancellationToken cancellationToken)
Send a PUT request to the specified Uri as an asynchronous operation.
Send a PUT request to the specified Uri as an asynchronous operation.
public Task<HttpResponseMessage> PutAsync(string requestUri, HttpContent content, CancellationToken cancellationToken)
public Task<HttpResponseMessage> PutAsync(Uri requestUri, HttpContent content, CancellationToken cancellationToken)
Send an HTTP request as an asynchronous operation.
public Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, HttpCompletionOption completionOption)
Send an HTTP request as an asynchronous operation.
public Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationToken cancellationToken)
Send an HTTP request as an asynchronous operation.