WebApplicationFactory<TEntryPoint>.CreateClient Method

Definition

Overloads

CreateClient()

Creates an instance of HttpClient that automatically follows redirects and handles cookies.

CreateClient(WebApplicationFactoryClientOptions)

Creates an instance of HttpClient that automatically follows redirects and handles cookies.

CreateClient()

Creates an instance of HttpClient that automatically follows redirects and handles cookies.

public:
 System::Net::Http::HttpClient ^ CreateClient();
public System.Net.Http.HttpClient CreateClient ();
member this.CreateClient : unit -> System.Net.Http.HttpClient
Public Function CreateClient () As HttpClient

Returns

HttpClient

The HttpClient.

CreateClient(WebApplicationFactoryClientOptions)

Creates an instance of HttpClient that automatically follows redirects and handles cookies.

public:
 System::Net::Http::HttpClient ^ CreateClient(Microsoft::AspNetCore::Mvc::Testing::WebApplicationFactoryClientOptions ^ options);
public System.Net.Http.HttpClient CreateClient (Microsoft.AspNetCore.Mvc.Testing.WebApplicationFactoryClientOptions options);
member this.CreateClient : Microsoft.AspNetCore.Mvc.Testing.WebApplicationFactoryClientOptions -> System.Net.Http.HttpClient
Public Function CreateClient (options As WebApplicationFactoryClientOptions) As HttpClient

Parameters

Returns

HttpClient

The HttpClient.

Applies to