HttpClientBuilderExtensions.ConfigureHttpMessageHandlerBuilder 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
警告
This method has been deprecated. Use ConfigurePrimaryHttpMessageHandler or ConfigureAdditionalHttpMessageHandlers instead.
新增用於設定訊息處理常式的委派,其會針對具名 HttpClient 使用 HttpMessageHandlerBuilder。
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
參數
- builder
- IHttpClientBuilder
- configureBuilder
- Action<HttpMessageHandlerBuilder>
用於設定 HttpMessageHandlerBuilder 的委派。
傳回
可以用於設定用戶端的 IHttpClientBuilder。
- 屬性