Uredi

Deli z drugimi prek


HttpMessageHandler.Send(HttpRequestMessage, CancellationToken) Method

Definition

When overridden in a derived class, sends an HTTP request with the specified request and cancellation token. Otherwise, throws a NotSupportedException.

protected public:
 virtual System::Net::Http::HttpResponseMessage ^ Send(System::Net::Http::HttpRequestMessage ^ request, System::Threading::CancellationToken cancellationToken);
protected internal virtual System.Net.Http.HttpResponseMessage Send (System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken);
abstract member Send : System.Net.Http.HttpRequestMessage * System.Threading.CancellationToken -> System.Net.Http.HttpResponseMessage
override this.Send : System.Net.Http.HttpRequestMessage * System.Threading.CancellationToken -> System.Net.Http.HttpResponseMessage
Protected Friend Overridable Function Send (request As HttpRequestMessage, cancellationToken As CancellationToken) As HttpResponseMessage

Parameters

request
HttpRequestMessage

The HTTP request message to send.

cancellationToken
CancellationToken

The cancellation token to cancel operation.

Returns

The HTTP response message.

Exceptions

The method is not overridden in the derived class.

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

Applies to