Edit

Share via


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

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

Initializes a new instance of the HttpResponseMessage class.

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

Applies to

HttpResponseMessage(HttpStatusCode)

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

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