Condividi tramite


HttpClientBuilderExtensions.ConfigureHttpClient Metodo

Definizione

Overload

ConfigureHttpClient(IHttpClientBuilder, Action<HttpClient>)

Aggiunge un delegato che verrà usato per configurare un oggetto HttpClient denominato.

ConfigureHttpClient(IHttpClientBuilder, Action<IServiceProvider,HttpClient>)

Aggiunge un delegato che verrà usato per configurare un oggetto HttpClient denominato.

ConfigureHttpClient(IHttpClientBuilder, Action<HttpClient>)

Origine:
HttpClientBuilderExtensions.cs
Origine:
HttpClientBuilderExtensions.cs
Origine:
HttpClientBuilderExtensions.cs
Origine:
HttpClientBuilderExtensions.cs
Origine:
HttpClientBuilderExtensions.cs

Aggiunge un delegato che verrà usato per configurare un oggetto HttpClient denominato.

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

Parametri

configureClient
Action<HttpClient>

Delegato usato per configurare HttpClient.

Restituisce

Oggetto IHttpClientBuilder che è possibile usare per configurare il client.

Si applica a

ConfigureHttpClient(IHttpClientBuilder, Action<IServiceProvider,HttpClient>)

Origine:
HttpClientBuilderExtensions.cs
Origine:
HttpClientBuilderExtensions.cs
Origine:
HttpClientBuilderExtensions.cs
Origine:
HttpClientBuilderExtensions.cs
Origine:
HttpClientBuilderExtensions.cs

Aggiunge un delegato che verrà usato per configurare un oggetto HttpClient denominato.

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

Parametri

configureClient
Action<IServiceProvider,HttpClient>

Delegato usato per configurare HttpClient.

Restituisce

Oggetto IHttpClientBuilder che è possibile usare per configurare il client.

Commenti

L'oggetto IServiceProvider fornito a configureClient sarà la stessa istanza del provider di servizi radice dell'applicazione.

Si applica a