TCnHttpClient.SendAsync(_HttpRequestMessage,THttpCompletionOption,_CancellationToken) Method

Send an HTTP request as an asynchronous operation.

Namespace: CNClrLib.Component.HttpClient
public
 function SendAsync(Request: _HttpRequestMessage; CompletionOption: THttpCompletionOption; CancellationToken: _CancellationToken): _GenericTask; overload;

Parameters

Request
Type: System.Void

The HTTP request message to send.

CompletionOption
Type: System.Void

When the operation should complete (as soon as a response is available or after reading the whole response content).

CancellationToken
Type: System.Void

A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Return Value

The task object representing the asynchronous operation. The return type in .Net is Task<HttpResponseMessage>.