DistributedApplicationFactory.CreateHttpClient(String, String) Method
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.
Creates an instance of HttpClient that is configured to route requests to the specified resource and endpoint.
public System.Net.Http.HttpClient CreateHttpClient (string resourceName, string? endpointName = default);
member this.CreateHttpClient : string * string -> System.Net.Http.HttpClient
Public Function CreateHttpClient (resourceName As String, Optional endpointName As String = Nothing) As HttpClient
Parameters
- resourceName
- String
- endpointName
- String
Returns
The HttpClient.