Show / Hide Table of Contents

Method SendAsync

SendAsync(HttpRequestMessage, CancellationToken)

Send an HTTP request as an asynchronous operation.

Declaration
protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Parameters
Type Name Description
HttpRequestMessage request

The HTTP request message to send.

CancellationToken cancellationToken

The cancellation token to cancel operation.

Returns
Type Description
Task<HttpResponseMessage>

The task object representing the asynchronous operation.

Overrides
HttpMessageHandler.SendAsync(HttpRequestMessage, CancellationToken)
Exceptions
Type Condition
ArgumentNullException

The request was null.

OperationCanceledException

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

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0200.0 - 200.8
.NET200.0 - 300.0
.NET Windows200.0 - 300.0
.NET Android200.3 - 300.0
.NET iOS200.0 - 300.0
.NET Framework200.0 - 200.8
UWP200.0 - 200.8
In this article
Provide feedback
Back to top Copyright © 2025 Esri.