HttpResponseMessage HttpResponseMessage HttpResponseMessage HttpResponseMessage Constructors

定义

重载

HttpResponseMessage() HttpResponseMessage() HttpResponseMessage()

初始化 HttpResponseMessage 类的新实例。Initializes a new instance of the HttpResponseMessage class.

HttpResponseMessage(HttpStatusCode) HttpResponseMessage(HttpStatusCode) HttpResponseMessage(HttpStatusCode) HttpResponseMessage(HttpStatusCode)

初始化的新实例HttpResponseMessage类具有特定StatusCodeInitializes a new instance of the HttpResponseMessage class with a specific StatusCode.

注解

若要获取的常用方法HttpResponseMessage来自之一HttpClient.SendAsync(HttpRequestMessage)方法。A common way to get an HttpResponseMessage is from one of the HttpClient.SendAsync(HttpRequestMessage) methods.

HttpResponseMessage() HttpResponseMessage() HttpResponseMessage()

初始化 HttpResponseMessage 类的新实例。Initializes a new instance of the HttpResponseMessage class.

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

HttpResponseMessage(HttpStatusCode) HttpResponseMessage(HttpStatusCode) HttpResponseMessage(HttpStatusCode) HttpResponseMessage(HttpStatusCode)

初始化的新实例HttpResponseMessage类具有特定StatusCodeInitializes a new instance of the HttpResponseMessage class with a specific StatusCode.

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 HttpStatusCode HttpStatusCode HttpStatusCode

HTTP 响应的状态代码。The status code of the HTTP response.

适用于