CosmosClientOptions.HttpClientFactory Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets a delegate to use to obtain an HttpClient instance to be used for HTTPS communication.
[Newtonsoft.Json.JsonIgnore]
public Func<System.Net.Http.HttpClient> HttpClientFactory { get; set; }
[<Newtonsoft.Json.JsonIgnore>]
member this.HttpClientFactory : Func<System.Net.Http.HttpClient> with get, set
Public Property HttpClientFactory As Func(Of HttpClient)
Property Value
- Attributes
-
Newtonsoft.Json.JsonIgnoreAttribute
Remarks
HTTPS communication is used when ConnectionMode is set to Gateway for all operations and when ConnectionMode is Direct (default) for metadata operations.
Useful in scenarios where the application is using a pool of HttpClient instances to be shared, like ASP.NET Core applications with IHttpClientFactory or Blazor WebAssembly applications.
For .NET core applications the default GatewayConnectionLimit will be ignored. It must be set on the HttpClientHandler.MaxConnectionsPerServer to limit the number of connections
Applies to
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應