Microsoft.Extensions.DependencyInjection.HttpClientFactoryServiceCollectionExtensions
Extension methods to configure an IServiceCollection for IHttpClientFactory.
Adds the IHttpClientFactory and related services to the IServiceCollection.
Adds the IHttpClientFactory and related services to the IServiceCollection and configures
a named HttpClient.
public static IHttpClientBuilder AddHttpClient(this IServiceCollection services, string name, Action<HttpClient> configureClient)
Adds the IHttpClientFactory and related services to the IServiceCollection and configures
a named HttpClient.
public static IHttpClientBuilder AddHttpClient(this IServiceCollection services, string name, Action<IServiceProvider, HttpClient> configureClient)
Adds the IHttpClientFactory and related services to the IServiceCollection and configures
a named HttpClient.
Adds the IHttpClientFactory and related services to the IServiceCollection and configures
a binding between the TClient type and a named HttpClient. The client name
will be set to the type name of TClient.
public static IHttpClientBuilder AddHttpClient<TClient, TImplementation>(this IServiceCollection services) where TImplementation : TClient
Adds the IHttpClientFactory and related services to the IServiceCollection and configures
a binding between the TClient type and a named HttpClient. The client name will
be set to the type name of TClient.
public static IHttpClientBuilder AddHttpClient<TClient>(this IServiceCollection services, string name)
Adds the IHttpClientFactory and related services to the IServiceCollection and configures
a binding between the TClient type and a named HttpClient.
public static IHttpClientBuilder AddHttpClient<TClient, TImplementation>(this IServiceCollection services, string name) where TImplementation : TClient
Adds the IHttpClientFactory and related services to the IServiceCollection and configures
a binding between the TClient type and a named HttpClient.
public static IHttpClientBuilder AddHttpClient<TClient>(this IServiceCollection services, Action<HttpClient> configureClient)
Adds the IHttpClientFactory and related services to the IServiceCollection and configures
a binding between the TClient type and a named HttpClient. The client name will
be set to the type name of TClient.
public static IHttpClientBuilder AddHttpClient<TClient>(this IServiceCollection services, Action<IServiceProvider, HttpClient> configureClient)
Adds the IHttpClientFactory and related services to the IServiceCollection and configures
a binding between the TClient type and a named HttpClient. The client name will
be set to the type name of TClient.
public static IHttpClientBuilder AddHttpClient<TClient, TImplementation>(this IServiceCollection services, Action<HttpClient> configureClient) where TImplementation : TClient
Adds the IHttpClientFactory and related services to the IServiceCollection and configures
a binding between the TClient type and a named HttpClient. The client name will
be set to the type name of TClient.
public static IHttpClientBuilder AddHttpClient<TClient, TImplementation>(this IServiceCollection services, Action<IServiceProvider, HttpClient> configureClient) where TImplementation : TClient
Adds the IHttpClientFactory and related services to the IServiceCollection and configures
a binding between the TClient type and a named HttpClient. The client name will
be set to the type name of TClient.
public static IHttpClientBuilder AddHttpClient<TClient>(this IServiceCollection services, string name, Action<HttpClient> configureClient)
Adds the IHttpClientFactory and related services to the IServiceCollection and configures
a binding between the TClient type and a named HttpClient.
public static IHttpClientBuilder AddHttpClient<TClient>(this IServiceCollection services, string name, Action<IServiceProvider, HttpClient> configureClient)
Adds the IHttpClientFactory and related services to the IServiceCollection and configures
a binding between the TClient type and a named HttpClient.
public static IHttpClientBuilder AddHttpClient<TClient, TImplementation>(this IServiceCollection services, string name, Action<HttpClient> configureClient) where TImplementation : TClient
Adds the IHttpClientFactory and related services to the IServiceCollection and configures
a binding between the TClient type and a named HttpClient.
public static IHttpClientBuilder AddHttpClient<TClient, TImplementation>(this IServiceCollection services, string name, Action<IServiceProvider, HttpClient> configureClient) where TImplementation : TClient
Adds the IHttpClientFactory and related services to the IServiceCollection and configures
a binding between the TClient type and a named HttpClient.
public static IHttpClientBuilder AddHttpClient<TClient, TImplementation>(this IServiceCollection services, Func<HttpClient, TImplementation> factory) where TImplementation : TClient
Adds the IHttpClientFactory and related services to the IServiceCollection and configures
a binding between the TClient type and a named HttpClient.
public static IHttpClientBuilder AddHttpClient<TClient, TImplementation>(this IServiceCollection services, string name, Func<HttpClient, TImplementation> factory) where TImplementation : TClient
Adds the IHttpClientFactory and related services to the IServiceCollection and configures
a binding between the TClient type and a named HttpClient.
public static IHttpClientBuilder AddHttpClient<TClient, TImplementation>(this IServiceCollection services, Func<HttpClient, IServiceProvider, TImplementation> factory) where TImplementation : TClient
Adds the IHttpClientFactory and related services to the IServiceCollection and configures
a binding between the TClient type and a named HttpClient.
public static IHttpClientBuilder AddHttpClient<TClient, TImplementation>(this IServiceCollection services, string name, Func<HttpClient, IServiceProvider, TImplementation> factory) where TImplementation : TClient
Adds the IHttpClientFactory and related services to the IServiceCollection and configures
a binding between the TClient type and a named HttpClient.
public static IServiceCollection ConfigureHttpClientDefaults(this IServiceCollection services, Action<IHttpClientBuilder> configure)
Adds a delegate that will be used to configure all HttpClient instances.