HttpRequestMessage Class
Represents a HTTP request message.
Assembly: System.Net.Http (in System.Net.Http.dll)
| Name | Description | |
|---|---|---|
![]() | HttpRequestMessage() | Initializes a new instance of the HttpRequestMessage class. |
![]() | HttpRequestMessage(HttpMethod^, String^) | Initializes a new instance of the HttpRequestMessage class with an HTTP method and a request Uri. |
![]() | HttpRequestMessage(HttpMethod^, Uri^) | Initializes a new instance of the HttpRequestMessage class with an HTTP method and a request Uri. |
| Name | Description | |
|---|---|---|
![]() | Content | Gets or sets the contents of the HTTP message. |
![]() | Headers | Gets the collection of HTTP request headers. |
![]() | Method | Gets or sets the HTTP method used by the HTTP request message. |
![]() | Properties | Gets a set of properties for the HTTP request. |
![]() | RequestUri | Gets or sets the Uri used for the HTTP request. |
![]() | Version | Gets or sets the HTTP message version. |
| Name | Description | |
|---|---|---|
![]() | Dispose() | Releases the unmanaged resources and disposes of the managed resources used by the HttpRequestMessage. |
![]() | Dispose(Boolean) | Releases the unmanaged resources used by the HttpRequestMessage and optionally disposes of the managed resources. |
![]() | Equals(Object^) | 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 the default hash function. (Inherited from Object.) |
![]() | GetType() | |
![]() | MemberwiseClone() | |
![]() | ToString() | Returns a string that represents the current object.(Overrides Object::ToString().) |
| Name | Description | |
|---|---|---|
![]() | GetUserPrincipal() | Gets the user principal associated with the specified HTTP request message.(Defined by HttpRequestMessageExtensionMethods.) |
![]() | SetUserPrincipal(IPrincipal^) | Replaces the user principal associated with the specified HTTP request message.(Defined by HttpRequestMessageExtensionMethods.) |
![]() | ToMessage() | Creates a Message instance from an HttpRequestMessage instance.(Defined by HttpRequestMessageExtensionMethods.) |
The HttpRequestMessage class contains headers, the HTTP verb, and potentially data.
Available since 8
.NET Framework
Available since 4.5
Portable Class Library
Supported in: portable .NET platforms
Windows Phone
Available since 8.1
Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.


