Share via


HttpMessageHandlerBuilder Class

Definition

A builder abstraction for configuring HttpMessageHandler instances.

public ref class HttpMessageHandlerBuilder abstract
public abstract class HttpMessageHandlerBuilder
type HttpMessageHandlerBuilder = class
Public MustInherit Class HttpMessageHandlerBuilder
Inheritance
HttpMessageHandlerBuilder

Remarks

The HttpMessageHandlerBuilder is registered in the service collection as a transient service. Callers should retrieve a new instance for each HttpMessageHandler to be created. Implementors should expect each instance to be used a single time.

Constructors

HttpMessageHandlerBuilder()

Initializes a new instance of the HttpMessageHandlerBuilder class.

Properties

AdditionalHandlers

Gets a list of additional DelegatingHandler instances used to configure an HttpClient pipeline.

Name

Gets or sets the name of the HttpClient being created.

PrimaryHandler

Gets or sets the primary HttpMessageHandler.

Services

Gets an IServiceProvider which can be used to resolve services from the dependency injection container.

Methods

Build()

Creates an HttpMessageHandler.

CreateHandlerPipeline(HttpMessageHandler, IEnumerable<DelegatingHandler>)

Constructs an instance of HttpMessageHandler by chaining additionalHandlers one after another with primaryHandler in the end of the chain. The resulting pipeline is used by IHttpClientFactory infrastructure to create HttpClient instances with customized message handlers. The resulting pipeline can also be accessed by using IHttpMessageHandlerFactory instead of IHttpClientFactory.

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to