共用方式為


HttpClientBuilderExtensions.ConfigureAdditionalHttpMessageHandlers 方法

定義

加入委派,這個委派將用來設定用於指定 HttpClient之的其他訊息處理程式HttpMessageHandlerBuilder

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IHttpClientBuilder ^ ConfigureAdditionalHttpMessageHandlers(Microsoft::Extensions::DependencyInjection::IHttpClientBuilder ^ builder, Action<System::Collections::Generic::IList<System::Net::Http::DelegatingHandler ^> ^, IServiceProvider ^> ^ configureAdditionalHandlers);
public static Microsoft.Extensions.DependencyInjection.IHttpClientBuilder ConfigureAdditionalHttpMessageHandlers (this Microsoft.Extensions.DependencyInjection.IHttpClientBuilder builder, Action<System.Collections.Generic.IList<System.Net.Http.DelegatingHandler>,IServiceProvider> configureAdditionalHandlers);
static member ConfigureAdditionalHttpMessageHandlers : Microsoft.Extensions.DependencyInjection.IHttpClientBuilder * Action<System.Collections.Generic.IList<System.Net.Http.DelegatingHandler>, IServiceProvider> -> Microsoft.Extensions.DependencyInjection.IHttpClientBuilder
<Extension()>
Public Function ConfigureAdditionalHttpMessageHandlers (builder As IHttpClientBuilder, configureAdditionalHandlers As Action(Of IList(Of DelegatingHandler), IServiceProvider)) As IHttpClientBuilder

參數

configureAdditionalHandlers
Action<IList<DelegatingHandler>,IServiceProvider>

用來設定物件集合的 DelegatingHandler 委派。

傳回

可以用於設定用戶端的 IHttpClientBuilder

適用於