HttpClientBuilderExtensions.ConfigureAdditionalHttpMessageHandlers Method

Definition

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Adds a delegate that will be used to configure additional message handlers using HttpMessageHandlerBuilder for a named HttpClient.

C#
public static Microsoft.Extensions.DependencyInjection.IHttpClientBuilder ConfigureAdditionalHttpMessageHandlers(this Microsoft.Extensions.DependencyInjection.IHttpClientBuilder builder, Action<System.Collections.Generic.IList<System.Net.Http.DelegatingHandler>,IServiceProvider> configureAdditionalHandlers);

Parameters

configureAdditionalHandlers
Action<IList<DelegatingHandler>,IServiceProvider>

A delegate that is used to configure a collection of DelegatingHandlers.

Returns

An IHttpClientBuilder that can be used to configure the client.

Applies to

Produk Versi
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Standard 2.0 (package-provided)