共用方式為


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

適用於