ClientHandler Class

Definition

This adapts HttpRequestMessages to ASP.NET Core requests, dispatches them through the pipeline, and returns the associated HttpResponseMessage.

C#
public class ClientHandler : System.Net.Http.HttpMessageHandler
Inheritance
ClientHandler

Constructors

Methods

Send(HttpRequestMessage, CancellationToken)

This synchronous method is not supported due to the risk of threadpool exhaustion when running multiple tests in parallel.

SendAsync(HttpRequestMessage, CancellationToken)

This adapts HttpRequestMessages to ASP.NET Core requests, dispatches them through the pipeline, and returns the associated HttpResponseMessage.

Applies to

Proizvod Verzije
ASP.NET Core 1.0, 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0