Op Englesch liesen Editéieren

Deelen iwwer


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.

C#
protected internal virtual System.Net.Http.HttpResponseMessage Send(System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken);

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

Produkt Versiounen
.NET 5, 6, 7, 8, 9, 10