HttpResponseMessage<T> Class
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Derived HttpResponseMessage class that contains a strongly typed object as its content.
Inheritance Hierarchy
System.Object
System.Net.Http.HttpResponseMessage
System.Net.Http.HttpResponseMessage<T>
Namespace: System.Net.Http
Assembly: System.Net.Http.Formatting (in System.Net.Http.Formatting.dll)
Syntax
'Declaration
Public Class HttpResponseMessage(Of T) _
Inherits HttpResponseMessage
public class HttpResponseMessage<T> : HttpResponseMessage
generic<typename T>
public ref class HttpResponseMessage : public HttpResponseMessage
type HttpResponseMessage<'T> =
class
inherit HttpResponseMessage
end
JScript does not support generic types or methods.
Type Parameters
- T
The type of object instances of this class will contain as its content.
The HttpResponseMessage<T> type exposes the following members.
Constructors
| Name | Description | |
|---|---|---|
![]() |
HttpResponseMessage<T>(HttpStatusCode) | Initializes a new instance of the <see cref="T:System.Net.Http.HttpResponseMessage`1" /> class. |
![]() |
HttpResponseMessage<T>(T) | Initializes a new instance of the <see cref="T:System.Net.Http.HttpResponseMessage`1" /> class. |
![]() |
HttpResponseMessage<T>(T, IEnumerable<MediaTypeFormatter>) | Initializes a new instance of the <see cref="T:System.Net.Http.HttpResponseMessage`1" /> class. |
![]() |
HttpResponseMessage<T>(T, IFormatterSelector) | Initializes a new instance of the <see cref="T:System.Net.Http.HttpResponseMessage`1" /> class. |
![]() |
HttpResponseMessage<T>(T, MediaTypeHeaderValue) | Initializes a new instance of the <see cref="T:System.Net.Http.HttpResponseMessage`1" /> class. |
![]() |
HttpResponseMessage<T>(T, HttpStatusCode) | Initializes a new instance of the <see cref="T:System.Net.Http.HttpResponseMessage`1" /> class. |
![]() |
HttpResponseMessage<T>(T, HttpStatusCode, IEnumerable<MediaTypeFormatter>) | Initializes a new instance of the <see cref="T:System.Net.Http.HttpResponseMessage`1" /> class. |
![]() |
HttpResponseMessage<T>(T, HttpRequestMessage, IEnumerable<MediaTypeFormatter>, IFormatterSelector) | Initializes a new instance of the <see cref="T:System.Net.Http.HttpResponseMessage`1" /> class. |
![]() |
HttpResponseMessage<T>(T, HttpRequestMessage, MediaTypeHeaderValue, IEnumerable<MediaTypeFormatter>, IFormatterSelector) | Initializes a new instance of the <see cref="T:System.Net.Http.HttpResponseMessage`1" /> class. |
Top
Properties
| Name | Description | |
|---|---|---|
![]() |
Content | Gets or sets the ObjectContent that manages the value for this instance. |
![]() |
Headers | Gets the collection of HTTP response headers. (Inherited from HttpResponseMessage.) |
![]() |
IsSuccessStatusCode | Gets a value that indicates if the HTTP response was successful. (Inherited from HttpResponseMessage.) |
![]() |
ReasonPhrase | Gets or sets the reason phrase which typically is sent by servers together with the status code. (Inherited from HttpResponseMessage.) |
![]() |
RequestMessage | Gets or sets the request message which led to this response message. (Inherited from HttpResponseMessage.) |
![]() |
StatusCode | Gets or sets the status code of the HTTP response. (Inherited from HttpResponseMessage.) |
![]() |
Version | Gets or sets the HTTP message version. (Inherited from HttpResponseMessage.) |
Top
Methods
| Name | Description | |
|---|---|---|
![]() |
Dispose() | Releases the unmanaged resources and disposes of unmanaged resources used by the HttpResponseMessage. (Inherited from HttpResponseMessage.) |
![]() |
Dispose(Boolean) | Releases the unmanaged resources used by the HttpResponseMessage and optionally disposes of the managed resources. (Inherited from HttpResponseMessage.) |
![]() |
EnsureSuccessStatusCode | Throws an exception if the IsSuccessStatusCode property for the HTTP response is false. (Inherited from HttpResponseMessage.) |
![]() |
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
![]() |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() |
GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() |
ToString | Returns a string that represents the current object. (Inherited from HttpResponseMessage.) |
Top
Extension Methods
Top
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
.gif)
.gif)
.gif)
.gif)