HttpClientBuilderExtensions.ConfigureHttpClient Metodo
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
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
- builder
- IHttpClientBuilder
Oggetto IServiceCollection.
- 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
- builder
- IHttpClientBuilder
Oggetto IServiceCollection.
- 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.