Delen via


PolicyHttpMessageHandler.SendCoreAsync Method

Definition

Called inside the execution of the Policy to perform request processing.

protected:
 virtual System::Threading::Tasks::Task<System::Net::Http::HttpResponseMessage ^> ^ SendCoreAsync(System::Net::Http::HttpRequestMessage ^ request, Polly::Context ^ context, System::Threading::CancellationToken cancellationToken);
protected virtual System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage> SendCoreAsync (System.Net.Http.HttpRequestMessage request, Polly.Context context, System.Threading.CancellationToken cancellationToken);
abstract member SendCoreAsync : System.Net.Http.HttpRequestMessage * Polly.Context * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage>
override this.SendCoreAsync : System.Net.Http.HttpRequestMessage * Polly.Context * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage>
Protected Overridable Function SendCoreAsync (request As HttpRequestMessage, context As Context, cancellationToken As CancellationToken) As Task(Of HttpResponseMessage)

Parameters

context
Context

The Context.

cancellationToken
CancellationToken

The CancellationToken.

Returns

Returns a Task<TResult> that will yield a response when completed.

Exceptions

The cancellation token was canceled. This exception is stored into the returned task.

Applies to