共用方式為


HttpClientBuilderExtensions.ConfigureHttpMessageHandlerBuilder 方法

定義

警告

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

參數

configureBuilder
Action<HttpMessageHandlerBuilder>

用於設定 HttpMessageHandlerBuilder 的委派。

傳回

可以用於設定用戶端的 IHttpClientBuilder

屬性

適用於