HttpClientBuilderExtensions.ConfigureHttpMessageHandlerBuilder 方法

定义

注意

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

添加一个委托,该委托将用于使用 HttpMessageHandlerBuilder 为已命名的 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

参数

configureBuilder
Action<HttpMessageHandlerBuilder>

用于配置 HttpMessageHandlerBuilder 的委托。

返回

可用于配置客户端的 IHttpClientBuilder

属性

适用于