HttpRequestMessage Class

HttpRequestMessage Class

.NET Framework (current version)
 

Represents a HTTP request message.

Namespace:   System.Net.Http
Assembly:  System.Net.Http (in System.Net.Http.dll)

System.Object
  System.Net.Http.HttpRequestMessage

public class HttpRequestMessage : IDisposable

NameDescription
System_CAPS_pubmethodHttpRequestMessage()

Initializes a new instance of the HttpRequestMessage class.

System_CAPS_pubmethodHttpRequestMessage(HttpMethod, String)

Initializes a new instance of the HttpRequestMessage class with an HTTP method and a request Uri.

System_CAPS_pubmethodHttpRequestMessage(HttpMethod, Uri)

Initializes a new instance of the HttpRequestMessage class with an HTTP method and a request Uri.

NameDescription
System_CAPS_pubpropertyContent

Gets or sets the contents of the HTTP message.

System_CAPS_pubpropertyHeaders

Gets the collection of HTTP request headers.

System_CAPS_pubpropertyMethod

Gets or sets the HTTP method used by the HTTP request message.

System_CAPS_pubpropertyProperties

Gets a set of properties for the HTTP request.

System_CAPS_pubpropertyRequestUri

Gets or sets the Uri used for the HTTP request.

System_CAPS_pubpropertyVersion

Gets or sets the HTTP message version.

NameDescription
System_CAPS_pubmethodDispose()

Releases the unmanaged resources and disposes of the managed resources used by the HttpRequestMessage.

System_CAPS_protmethodDispose(Boolean)

Releases the unmanaged resources used by the HttpRequestMessage and optionally disposes of the managed resources.

System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Overrides Object.ToString().)

NameDescription
System_CAPS_pubmethodGetUserPrincipal()

Gets the user principal associated with the specified HTTP request message.(Defined by HttpRequestMessageExtensionMethods.)

System_CAPS_pubmethodSetUserPrincipal(IPrincipal)

Replaces the user principal associated with the specified HTTP request message.(Defined by HttpRequestMessageExtensionMethods.)

System_CAPS_pubmethodToMessage()

Creates a Message instance from an HttpRequestMessage instance.(Defined by HttpRequestMessageExtensionMethods.)

The HttpRequestMessage class contains headers, the HTTP verb, and potentially data.

Universal Windows Platform
Available since 4.5
.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.

Return to top
Show:
© 2016 Microsoft