WebApplicationFactory<TEntryPoint>.CreateDefaultClient 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.
Overloads
CreateDefaultClient(DelegatingHandler[]) |
Creates a new instance of an HttpClient that can be used to
send HttpRequestMessage to the server. The base address of the HttpClient
instance will be set to |
CreateDefaultClient(Uri, DelegatingHandler[]) |
Creates a new instance of an HttpClient that can be used to send HttpRequestMessage to the server. |
CreateDefaultClient(DelegatingHandler[])
- Source:
- WebApplicationFactory.cs
- Source:
- WebApplicationFactory.cs
- Source:
- WebApplicationFactory.cs
- Source:
- WebApplicationFactory.cs
- Source:
- WebApplicationFactory.cs
- Source:
- WebApplicationFactory.cs
- Source:
- WebApplicationFactory.cs
- Source:
- WebApplicationFactory.cs
- Source:
- WebApplicationFactory.cs
Creates a new instance of an HttpClient that can be used to
send HttpRequestMessage to the server. The base address of the HttpClient
instance will be set to http://localhost
.
public:
System::Net::Http::HttpClient ^ CreateDefaultClient(... cli::array <System::Net::Http::DelegatingHandler ^> ^ handlers);
public System.Net.Http.HttpClient CreateDefaultClient (params System.Net.Http.DelegatingHandler[] handlers);
member this.CreateDefaultClient : System.Net.Http.DelegatingHandler[] -> System.Net.Http.HttpClient
Public Function CreateDefaultClient (ParamArray handlers As DelegatingHandler()) As HttpClient
Parameters
- handlers
- DelegatingHandler[]
A list of DelegatingHandler instances to set up on the HttpClient.
Returns
The HttpClient.
Applies to
CreateDefaultClient(Uri, DelegatingHandler[])
- Source:
- WebApplicationFactory.cs
- Source:
- WebApplicationFactory.cs
- Source:
- WebApplicationFactory.cs
- Source:
- WebApplicationFactory.cs
- Source:
- WebApplicationFactory.cs
- Source:
- WebApplicationFactory.cs
- Source:
- WebApplicationFactory.cs
- Source:
- WebApplicationFactory.cs
- Source:
- WebApplicationFactory.cs
Creates a new instance of an HttpClient that can be used to send HttpRequestMessage to the server.
public:
System::Net::Http::HttpClient ^ CreateDefaultClient(Uri ^ baseAddress, ... cli::array <System::Net::Http::DelegatingHandler ^> ^ handlers);
public System.Net.Http.HttpClient CreateDefaultClient (Uri baseAddress, params System.Net.Http.DelegatingHandler[] handlers);
member this.CreateDefaultClient : Uri * System.Net.Http.DelegatingHandler[] -> System.Net.Http.HttpClient
Public Function CreateDefaultClient (baseAddress As Uri, ParamArray handlers As DelegatingHandler()) As HttpClient
Parameters
- baseAddress
- Uri
The base address of the HttpClient instance.
- handlers
- DelegatingHandler[]
A list of DelegatingHandler instances to set up on the HttpClient.
Returns
The HttpClient.