Share via


DistributedApplicationHostingTestingExtensions.CreateHttpClient Method

Definition

Creates an HttpClient configured to communicate with the specified resource.

public static System.Net.Http.HttpClient CreateHttpClient (this Aspire.Hosting.DistributedApplication app, string resourceName, string? endpointName = default);
static member CreateHttpClient : Aspire.Hosting.DistributedApplication * string * string -> System.Net.Http.HttpClient
<Extension()>
Public Function CreateHttpClient (app As DistributedApplication, resourceName As String, Optional endpointName As String = Nothing) As HttpClient

Parameters

resourceName
String
endpointName
String

Returns

The HttpClient.

Applies to