HttpClientBuilderExtensions.ConfigureHttpClient Metoda

Definicja

Przeciążenia

ConfigureHttpClient(IHttpClientBuilder, Action<IServiceProvider,HttpClient>)

Dodaje delegata, który zostanie użyty do skonfigurowania nazwanego HttpClient .Adds a delegate that will be used to configure a named HttpClient.

ConfigureHttpClient(IHttpClientBuilder, Action<HttpClient>)

Dodaje delegata, który zostanie użyty do skonfigurowania nazwanego HttpClient .Adds a delegate that will be used to configure a named HttpClient.

ConfigureHttpClient(IHttpClientBuilder, Action<IServiceProvider,HttpClient>)

Dodaje delegata, który zostanie użyty do skonfigurowania nazwanego HttpClient .Adds a delegate that will be used to configure a named HttpClient.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IHttpClientBuilder ^ ConfigureHttpClient(Microsoft::Extensions::DependencyInjection::IHttpClientBuilder ^ builder, Action<IServiceProvider ^, System::Net::Http::HttpClient ^> ^ configureClient);
public static Microsoft.Extensions.DependencyInjection.IHttpClientBuilder ConfigureHttpClient (this Microsoft.Extensions.DependencyInjection.IHttpClientBuilder builder, Action<IServiceProvider,System.Net.Http.HttpClient> configureClient);
static member ConfigureHttpClient : Microsoft.Extensions.DependencyInjection.IHttpClientBuilder * Action<IServiceProvider, System.Net.Http.HttpClient> -> Microsoft.Extensions.DependencyInjection.IHttpClientBuilder
<Extension()>
Public Function ConfigureHttpClient (builder As IHttpClientBuilder, configureClient As Action(Of IServiceProvider, HttpClient)) As IHttpClientBuilder

Parametry

configureClient
Action<IServiceProvider,HttpClient>

Delegat, który jest używany do konfigurowania HttpClient .A delegate that is used to configure an HttpClient.

Zwraca

IHttpClientBuilder

IHttpClientBuilder, Którego można użyć do skonfigurowania klienta.An IHttpClientBuilder that can be used to configure the client.

Uwagi

IServiceProviderPodana wartość to configureClient będzie to wystąpienie dostawcy głównej usługi aplikacji.The IServiceProvider provided to configureClient will be the same application's root service provider instance.

Dotyczy

ConfigureHttpClient(IHttpClientBuilder, Action<HttpClient>)

Dodaje delegata, który zostanie użyty do skonfigurowania nazwanego HttpClient .Adds a delegate that will be used to configure a named HttpClient.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IHttpClientBuilder ^ ConfigureHttpClient(Microsoft::Extensions::DependencyInjection::IHttpClientBuilder ^ builder, Action<System::Net::Http::HttpClient ^> ^ configureClient);
public static Microsoft.Extensions.DependencyInjection.IHttpClientBuilder ConfigureHttpClient (this Microsoft.Extensions.DependencyInjection.IHttpClientBuilder builder, Action<System.Net.Http.HttpClient> configureClient);
static member ConfigureHttpClient : Microsoft.Extensions.DependencyInjection.IHttpClientBuilder * Action<System.Net.Http.HttpClient> -> Microsoft.Extensions.DependencyInjection.IHttpClientBuilder
<Extension()>
Public Function ConfigureHttpClient (builder As IHttpClientBuilder, configureClient As Action(Of HttpClient)) As IHttpClientBuilder

Parametry

configureClient
Action<HttpClient>

Delegat, który jest używany do konfigurowania HttpClient .A delegate that is used to configure an HttpClient.

Zwraca

IHttpClientBuilder

IHttpClientBuilder, Którego można użyć do skonfigurowania klienta.An IHttpClientBuilder that can be used to configure the client.

Dotyczy