Udostępnij za pośrednictwem


HttpClientBuilderExtensions.ConfigureHttpMessageHandlerBuilder Metoda

Definicja

Przestroga

This method has been deprecated. Use ConfigurePrimaryHttpMessageHandler or ConfigureAdditionalHttpMessageHandlers instead.

Dodaje delegata, który będzie używany do konfigurowania procedur obsługi komunikatów przy użyciu HttpMessageHandlerBuilder nazwy HttpClient.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IHttpClientBuilder ^ ConfigureHttpMessageHandlerBuilder(Microsoft::Extensions::DependencyInjection::IHttpClientBuilder ^ builder, Action<Microsoft::Extensions::Http::HttpMessageHandlerBuilder ^> ^ configureBuilder);
[System.Obsolete("This method has been deprecated. Use ConfigurePrimaryHttpMessageHandler or ConfigureAdditionalHttpMessageHandlers instead.")]
public static Microsoft.Extensions.DependencyInjection.IHttpClientBuilder ConfigureHttpMessageHandlerBuilder (this Microsoft.Extensions.DependencyInjection.IHttpClientBuilder builder, Action<Microsoft.Extensions.Http.HttpMessageHandlerBuilder> configureBuilder);
[<System.Obsolete("This method has been deprecated. Use ConfigurePrimaryHttpMessageHandler or ConfigureAdditionalHttpMessageHandlers instead.")>]
static member ConfigureHttpMessageHandlerBuilder : Microsoft.Extensions.DependencyInjection.IHttpClientBuilder * Action<Microsoft.Extensions.Http.HttpMessageHandlerBuilder> -> Microsoft.Extensions.DependencyInjection.IHttpClientBuilder
<Extension()>
Public Function ConfigureHttpMessageHandlerBuilder (builder As IHttpClientBuilder, configureBuilder As Action(Of HttpMessageHandlerBuilder)) As IHttpClientBuilder

Parametry

configureBuilder
Action<HttpMessageHandlerBuilder>

Delegat używany do konfigurowania elementu HttpMessageHandlerBuilder.

Zwraca

Element IHttpClientBuilder , którego można użyć do skonfigurowania klienta.

Atrybuty

Dotyczy