Share via


ClientHandler.SendAsync(HttpRequestMessage, CancellationToken) Method

Definition

This adapts HttpRequestMessages to ASP.NET Core requests, dispatches them through the pipeline, and returns the associated HttpResponseMessage.

protected:
 override System::Threading::Tasks::Task<System::Net::Http::HttpResponseMessage ^> ^ SendAsync(System::Net::Http::HttpRequestMessage ^ request, System::Threading::CancellationToken cancellationToken);
protected override System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage> SendAsync (System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken);
override this.SendAsync : System.Net.Http.HttpRequestMessage * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage>
Protected Overrides Function SendAsync (request As HttpRequestMessage, cancellationToken As CancellationToken) As Task(Of HttpResponseMessage)

Parameters

cancellationToken
CancellationToken

The CancellationToken.

Returns

A Task<TResult> returning the HttpResponseMessage.

Applies to