HttpResponseMessage 构造函数

定义

初始化 HttpResponseMessage 类的新实例。

重载

HttpResponseMessage()

初始化 HttpResponseMessage 类的新实例。

HttpResponseMessage(HttpStatusCode)

初始化指定的 HttpResponseMessageStatusCode 类的新实例。

注解

获取 HttpResponseMessage 的常见方法是从方法之 HttpClient.SendAsync(HttpRequestMessage) 一获取 。

HttpResponseMessage()

Source:
HttpResponseMessage.cs
Source:
HttpResponseMessage.cs
Source:
HttpResponseMessage.cs

初始化 HttpResponseMessage 类的新实例。

public:
 HttpResponseMessage();
public HttpResponseMessage ();
Public Sub New ()

适用于

HttpResponseMessage(HttpStatusCode)

Source:
HttpResponseMessage.cs
Source:
HttpResponseMessage.cs
Source:
HttpResponseMessage.cs

初始化指定的 HttpResponseMessageStatusCode 类的新实例。

public:
 HttpResponseMessage(System::Net::HttpStatusCode statusCode);
public HttpResponseMessage (System.Net.HttpStatusCode statusCode);
new System.Net.Http.HttpResponseMessage : System.Net.HttpStatusCode -> System.Net.Http.HttpResponseMessage
Public Sub New (statusCode As HttpStatusCode)

参数

statusCode
HttpStatusCode

HTTP 响应的状态代码。

适用于