EasyAF_Http_IHttpClientBuilderExtensions

Provides extension methods for IHttpClientBuilder to configure message handlers based on HttpHandlerMode. Enables flexible configuration of HTTP message handler pipelines for different scenarios.

Syntax

public static class EasyAF_Http_IHttpClientBuilderExtensions

Inheritance

Methods

AddHttpMessageHandler<THandler>

public static IHttpClientBuilder AddHttpMessageHandler<THandler>(this IHttpClientBuilder builder, HttpHandlerMode mode) where THandler : DelegatingHandler
Given the , adds the specified THandler to the beginning or end of the pipeline.

Parameters

  • builder IHttpClientBuilder: The instance to extend.
  • mode HttpHandlerMode: A specifying whether we are making this handler the first one in the pipeline, or the last.

Returns

IHttpClientBuilder The IHttpClientBuilder instance for method chaining.