Bagikan melalui


HttpClientBuilderExtensions.ConfigureAdditionalHttpMessageHandlers Metode

Definisi

Menambahkan delegasi yang akan digunakan untuk mengonfigurasi penangan pesan tambahan menggunakan HttpMessageHandlerBuilder untuk yang bernama HttpClient.

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

Parameter

configureAdditionalHandlers
Action<IList<DelegatingHandler>,IServiceProvider>

Delegasi yang digunakan untuk mengonfigurasi kumpulan DelegatingHandler objek.

Mengembalikan

Yang IHttpClientBuilder dapat digunakan untuk mengonfigurasi klien.

Berlaku untuk