Windows Dev Center

The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

HttpClient.SendAsync Method (HttpRequestMessage, HttpCompletionOption)

.NET Framework 4.6 and 4.5

Send an HTTP request as an asynchronous operation.

Namespace:  System.Net.Http
Assembly:  System.Net.Http (in System.Net.Http.dll)

public Task<HttpResponseMessage> SendAsync(
	HttpRequestMessage request,
	HttpCompletionOption completionOption


Type: System.Net.Http.HttpRequestMessage

The HTTP request message to send.

Type: System.Net.Http.HttpCompletionOption

When the operation should complete (as soon as a response is available or after reading the whole response content).

Return Value

Type: System.Threading.Tasks.Task<HttpResponseMessage>
Returns Task<TResult>.
The task object representing the asynchronous operation.


The request was null.


The request message was already sent by the HttpClient instance.

This operation will not block. Depending on the value of the completionOption parameter, the returned Task<TResult> object will complete as soon as a response is available or the entire response including content is read.

.NET Framework

Supported in: 4.6, 4.5

.NET for Windows Phone apps

Supported in: Windows Phone 8.1
© 2015 Microsoft