Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

class System.​Net.​Http.​HttpResponseMessage

Assembly: System.Net.Http

Inheritance: object → HttpResponseMessage

Implemented Interfaces

Represents a HTTP response message including the status code and data.

Properties

public HttpContent
Content
Gets or sets the content of a HTTP response message.
Headers
Gets the collection of HTTP response headers.
public bool
IsSuccessStatusCode
Gets a value that indicates if the HTTP response was successful.
public string
ReasonPhrase
Gets or sets the reason phrase, which typically is sent by servers together with the status code.
RequestMessage
Gets or sets the request message that led to this response message.
StatusCode
Gets or sets the status code of the HTTP response.
TrailingHeaders
Gets the collection of trailing headers included in an HTTP response.
public Version
Version
Gets or sets the HTTP message version.

Methods

public void
Dispose​()
Releases the unmanaged resources and disposes of unmanaged resources used by the <see cref="T:System.Net.Http.HttpResponseMessage" /> .
protected void
Dispose​(bool disposing)
Releases the unmanaged resources used by the <see cref="T:System.Net.Http.HttpResponseMessage" /> and optionally disposes of the managed resources.
disposing <see langword="true" /> to release both managed and unmanaged resources; <see langword="false" /> to releases only unmanaged resources.
EnsureSuccessStatusCode​()
Throws an exception if the <see cref="P:System.Net.Http.HttpResponseMessage.IsSuccessStatusCode" /> property for the HTTP response is <see langword="false" /> .
Returns The HTTP response message if the call is successful.
public string
ToString​()
Returns a string that represents the current object.
Returns A string representation of the current object.
public bool
Equals​(object obj)
Inherited from object
protected void
Finalize​()
Inherited from object
public int
GetHashCode​()
Inherited from object
public Type
GetType​()
Inherited from object
protected object
MemberwiseClone​()
Inherited from object