Partager via


HttpClientBuilderExtensions.ConfigureHttpClient Méthode

Définition

Surcharges

ConfigureHttpClient(IHttpClientBuilder, Action<HttpClient>)

Ajoute un délégué utilisé pour configurer un HttpClient nommé.

ConfigureHttpClient(IHttpClientBuilder, Action<IServiceProvider,HttpClient>)

Ajoute un délégué utilisé pour configurer un HttpClient nommé.

ConfigureHttpClient(IHttpClientBuilder, Action<HttpClient>)

Source:
HttpClientBuilderExtensions.cs
Source:
HttpClientBuilderExtensions.cs
Source:
HttpClientBuilderExtensions.cs
Source:
HttpClientBuilderExtensions.cs
Source:
HttpClientBuilderExtensions.cs

Ajoute un délégué utilisé pour configurer un HttpClient nommé.

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

Paramètres

builder
IHttpClientBuilder

L’IServiceCollectionopérateur

configureClient
Action<HttpClient>

Délégué utilisé pour configurer un HttpClient.

Retours

IHttpClientBuilder qui peut être utilisé pour configurer le client.

S’applique à

ConfigureHttpClient(IHttpClientBuilder, Action<IServiceProvider,HttpClient>)

Source:
HttpClientBuilderExtensions.cs
Source:
HttpClientBuilderExtensions.cs
Source:
HttpClientBuilderExtensions.cs
Source:
HttpClientBuilderExtensions.cs
Source:
HttpClientBuilderExtensions.cs

Ajoute un délégué utilisé pour configurer un HttpClient nommé.

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

Paramètres

builder
IHttpClientBuilder

L’IServiceCollectionopérateur

configureClient
Action<IServiceProvider,HttpClient>

Délégué utilisé pour configurer un HttpClient.

Retours

IHttpClientBuilder qui peut être utilisé pour configurer le client.

Remarques

Le IServiceProvider fourni à configureClient sera le fournisseur de services racine de la même application instance.

S’applique à