WebApplicationFactory<TEntryPoint>.CreateClient 方法

定义

重载

CreateClient()

创建 一个 实例,该实例 HttpClient 会自动跟踪重定向并处理 Cookie。

CreateClient(WebApplicationFactoryClientOptions)

创建 一个 实例,该实例 HttpClient 会自动跟踪重定向并处理 Cookie。

CreateClient()

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

创建 一个 实例,该实例 HttpClient 会自动跟踪重定向并处理 Cookie。

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

返回

HttpClient

适用于

CreateClient(WebApplicationFactoryClientOptions)

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

创建 一个 实例,该实例 HttpClient 会自动跟踪重定向并处理 Cookie。

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

参数

返回

HttpClient

适用于