語言

HttpClientFactoryServiceCollectionExtensions 類別

定義

為 IServiceCollection設定 IHttpClientFactory 的擴充方法。

public ref class HttpClientFactoryServiceCollectionExtensions abstract sealed
public static class HttpClientFactoryServiceCollectionExtensions
type HttpClientFactoryServiceCollectionExtensions = class
Public Module HttpClientFactoryServiceCollectionExtensions
繼承
HttpClientFactoryServiceCollectionExtensions

方法

名稱 Description
AddHttpClient(IServiceCollection, String, Action<HttpClient>)

將 及相關服務加入 IHttpClientFactory , IServiceCollection 並配置一個命名 HttpClient的 。

AddHttpClient(IServiceCollection, String, Action<IServiceProvider,HttpClient>)

將 及相關服務加入 IHttpClientFactory , IServiceCollection 並配置一個命名 HttpClient的 。

AddHttpClient(IServiceCollection, String)

將 及相關服務加入 IHttpClientFactory , IServiceCollection 並配置一個命名 HttpClient的 。

AddHttpClient(IServiceCollection)

新增 及 IHttpClientFactory 相關服務至 IServiceCollection。

AddHttpClient<TClient,TImplementation>(IServiceCollection, Action<HttpClient>)

將 IHttpClientFactory 及相關服務加入 ,IServiceCollection並在型別與命名 TClient之間配置綁定HttpClient。 客戶端名稱會被設定為型別名稱 TClient。

AddHttpClient<TClient,TImplementation>(IServiceCollection, Action<IServiceProvider,HttpClient>)

將 IHttpClientFactory 及相關服務加入 ,IServiceCollection並在型別與命名 TClient之間配置綁定HttpClient。 客戶端名稱會被設定為型別名稱 TClient。

AddHttpClient<TClient,TImplementation>(IServiceCollection, Func<HttpClient,IServiceProvider,TImplementation>)

將 IHttpClientFactory 及相關服務加入 ,IServiceCollection並在型別與命名 TClient之間配置綁定HttpClient。

AddHttpClient<TClient,TImplementation>(IServiceCollection, Func<HttpClient,TImplementation>)

將 IHttpClientFactory 及相關服務加入 ,IServiceCollection並在型別與命名 TClient之間配置綁定HttpClient。

AddHttpClient<TClient,TImplementation>(IServiceCollection, String, Action<HttpClient>)

將 IHttpClientFactory 及相關服務加入 ,IServiceCollection並在型別與命名 TClient之間配置綁定HttpClient。

AddHttpClient<TClient,TImplementation>(IServiceCollection, String, Action<IServiceProvider,HttpClient>)

將 IHttpClientFactory 及相關服務加入 ,IServiceCollection並在型別與命名 TClient之間配置綁定HttpClient。

AddHttpClient<TClient,TImplementation>(IServiceCollection, String, Func<HttpClient,IServiceProvider,TImplementation>)

將 IHttpClientFactory 及相關服務加入 ,IServiceCollection並在型別與命名 TClient之間配置綁定HttpClient。

AddHttpClient<TClient,TImplementation>(IServiceCollection, String, Func<HttpClient,TImplementation>)

將 IHttpClientFactory 及相關服務加入 ,IServiceCollection並在型別與命名 TClient之間配置綁定HttpClient。

AddHttpClient<TClient,TImplementation>(IServiceCollection, String)

將 IHttpClientFactory 及相關服務加入 ,IServiceCollection並在型別與命名 TClient之間配置綁定HttpClient。

AddHttpClient<TClient,TImplementation>(IServiceCollection)

將 IHttpClientFactory 及相關服務加入 ,IServiceCollection並在型別與命名 TClient之間配置綁定HttpClient。 客戶端名稱會被設定為型別名稱 TClient。

AddHttpClient<TClient>(IServiceCollection, Action<HttpClient>)

將 IHttpClientFactory 及相關服務加入 ,IServiceCollection並在型別與命名 TClient之間配置綁定HttpClient。 客戶端名稱會被設定為型別名稱 TClient。

AddHttpClient<TClient>(IServiceCollection, Action<IServiceProvider,HttpClient>)

將 IHttpClientFactory 及相關服務加入 ,IServiceCollection並在型別與命名 TClient之間配置綁定HttpClient。 客戶端名稱會被設定為型別名稱 TClient。

AddHttpClient<TClient>(IServiceCollection, String, Action<HttpClient>)

將 IHttpClientFactory 及相關服務加入 ,IServiceCollection並在型別與命名 TClient之間配置綁定HttpClient。

AddHttpClient<TClient>(IServiceCollection, String, Action<IServiceProvider,HttpClient>)

將 IHttpClientFactory 及相關服務加入 ,IServiceCollection並在型別與命名 TClient之間配置綁定HttpClient。

AddHttpClient<TClient>(IServiceCollection, String)

將 IHttpClientFactory 及相關服務加入 ,IServiceCollection並在型別與命名 TClient之間配置綁定HttpClient。

AddHttpClient<TClient>(IServiceCollection)

將 IHttpClientFactory 及相關服務加入 ,IServiceCollection並在型別與命名 TClient之間配置綁定HttpClient。 客戶端名稱會被設定為型別名稱 TClient。

ConfigureHttpClientDefaults(IServiceCollection, Action<IHttpClientBuilder>)

新增一個代理,用於配置所有 HttpClient 實例。

適用於