HttpResponseMessage Constructors

Definition

Initializes a new instance of the HttpResponseMessage class.

Overloads

HttpResponseMessage()

Initializes a new instance of the HttpResponseMessage class.

HttpResponseMessage(HttpStatusCode)

Initializes a new instance of the HttpResponseMessage class with a specific StatusCode.

Remarks

A common way to get an HttpResponseMessage is from one of the HttpClient.SendAsync(HttpRequestMessage) methods.

HttpResponseMessage()

Initializes a new instance of the HttpResponseMessage class.

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

Applies to

HttpResponseMessage(HttpStatusCode)

Initializes 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)

Parameters

statusCode
HttpStatusCode

The status code of the HTTP response.

Applies to