HttpClientBuilderExtensions.ConfigureHttpClient Método
Definición
Importante
Parte de la información hace referencia a la versión preliminar del producto, que puede haberse modificado sustancialmente antes de lanzar la versión definitiva. Microsoft no otorga ninguna garantía, explícita o implícita, con respecto a la información proporcionada aquí.
Sobrecargas
ConfigureHttpClient(IHttpClientBuilder, Action<HttpClient>) |
Agrega un delegado que se usará para configurar un objeto HttpClient con nombre. |
ConfigureHttpClient(IHttpClientBuilder, Action<IServiceProvider,HttpClient>) |
Agrega un delegado que se usará para configurar un objeto HttpClient con nombre. |
ConfigureHttpClient(IHttpClientBuilder, Action<HttpClient>)
Agrega un delegado que se usará para configurar un objeto HttpClient con nombre.
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
Parámetros
- builder
- IHttpClientBuilder
- configureClient
- Action<HttpClient>
Un delegado que se usa para configurar un objeto HttpClient.
Devoluciones
Un objeto IHttpClientBuilder que se puede usar para configurar el cliente.
Se aplica a
ConfigureHttpClient(IHttpClientBuilder, Action<IServiceProvider,HttpClient>)
Agrega un delegado que se usará para configurar un objeto HttpClient con nombre.
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
Parámetros
- builder
- IHttpClientBuilder
- configureClient
- Action<IServiceProvider,HttpClient>
Un delegado que se usa para configurar un objeto HttpClient.
Devoluciones
Un objeto IHttpClientBuilder que se puede usar para configurar el cliente.
Comentarios
El IServiceProvider proporcionado para configureClient
será la misma instancia del proveedor de servicios raíz de la aplicación.