WebHostBuilderExtensions.GetTestClient(IWebHost) 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.
Caution
IWebHost is obsolete. Use IHost instead. For more information, visit https://aka.ms/aspnet/deprecate/008.
Retrieves the test client from the TestServer in the host services.
public:
[System::Runtime::CompilerServices::Extension]
static System::Net::Http::HttpClient ^ GetTestClient(Microsoft::AspNetCore::Hosting::IWebHost ^ host);
[System.Obsolete("IWebHost is obsolete. Use IHost instead. For more information, visit https://aka.ms/aspnet/deprecate/008.", DiagnosticId="ASPDEPR008", UrlFormat="https://aka.ms/aspnet/deprecate/008")]
public static System.Net.Http.HttpClient GetTestClient(this Microsoft.AspNetCore.Hosting.IWebHost host);
public static System.Net.Http.HttpClient GetTestClient(this Microsoft.AspNetCore.Hosting.IWebHost host);
[<System.Obsolete("IWebHost is obsolete. Use IHost instead. For more information, visit https://aka.ms/aspnet/deprecate/008.", DiagnosticId="ASPDEPR008", UrlFormat="https://aka.ms/aspnet/deprecate/008")>]
static member GetTestClient : Microsoft.AspNetCore.Hosting.IWebHost -> System.Net.Http.HttpClient
static member GetTestClient : Microsoft.AspNetCore.Hosting.IWebHost -> System.Net.Http.HttpClient
<Extension()>
Public Function GetTestClient (host As IWebHost) As HttpClient
Parameters
- host
- IWebHost
Returns
- Attributes