Sdílet prostřednictvím


HttpClientBuilderExtensions.ConfigureHttpClient Metoda

Definice

Přetížení

ConfigureHttpClient(IHttpClientBuilder, Action<HttpClient>)

Přidá delegáta, který se použije ke konfiguraci pojmenovaného .HttpClient

ConfigureHttpClient(IHttpClientBuilder, Action<IServiceProvider,HttpClient>)

Přidá delegáta, který se použije ke konfiguraci pojmenovaného .HttpClient

ConfigureHttpClient(IHttpClientBuilder, Action<HttpClient>)

Zdroj:
HttpClientBuilderExtensions.cs
Zdroj:
HttpClientBuilderExtensions.cs
Zdroj:
HttpClientBuilderExtensions.cs
Zdroj:
HttpClientBuilderExtensions.cs
Zdroj:
HttpClientBuilderExtensions.cs

Přidá delegáta, který se použije ke konfiguraci pojmenovaného .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>

Delegát, který se používá ke konfiguraci .HttpClient

Návraty

Objekt IHttpClientBuilder , který lze použít ke konfiguraci klienta.

Platí pro

ConfigureHttpClient(IHttpClientBuilder, Action<IServiceProvider,HttpClient>)

Zdroj:
HttpClientBuilderExtensions.cs
Zdroj:
HttpClientBuilderExtensions.cs
Zdroj:
HttpClientBuilderExtensions.cs
Zdroj:
HttpClientBuilderExtensions.cs
Zdroj:
HttpClientBuilderExtensions.cs

Přidá delegáta, který se použije ke konfiguraci pojmenovaného .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>

Delegát, který se používá ke konfiguraci .HttpClient

Návraty

Objekt IHttpClientBuilder , který lze použít ke konfiguraci klienta.

Poznámky

Zadaným IServiceProvider objektem configureClient bude instance kořenového poskytovatele služeb stejné aplikace.

Platí pro