Share via


ClientHandler Class

Definition

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

public ref class ClientHandler : System::Net::Http::HttpMessageHandler
public class ClientHandler : System.Net.Http.HttpMessageHandler
type ClientHandler = class
    inherit HttpMessageHandler
Public Class ClientHandler
Inherits HttpMessageHandler
Inheritance
ClientHandler

Constructors

ClientHandler(PathString, IHttpApplication<HostingApplication.Context>)

Create a new handler.

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