HttpRequestMessage Class

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Represents a HTTP request message.

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

'Declaration
Public Class HttpRequestMessage _
	Implements IDisposable

The HttpRequestMessage type exposes the following members.

  NameDescription
Public methodHttpRequestMessageInitializes a new instance of the HttpRequestMessage class.
Public methodHttpRequestMessage(HttpMethod, String)Initializes a new instance of the HttpRequestMessage class with an HTTP method and a request Uri.
Public methodHttpRequestMessage(HttpMethod, Uri)Initializes a new instance of the HttpRequestMessage class with an HTTP method and a request Uri.
Top

  NameDescription
Public propertyContentGets or sets the contents of the HTTP message.
Public propertyHeadersGets the collection of HTTP request headers.
Public propertyMethodGets or sets the HTTP method used by the HTTP request message.
Public propertyPropertiesGets a set of properties for the HTTP request.
Public propertyRequestUriGets or sets the Uri used for the HTTP request.
Public propertyVersionGets or sets the HTTP message version.
Top

  NameDescription
Public methodDisposeReleases the unmanaged resources and disposes of the managed resources used by the HttpRequestMessage.
Protected methodDispose(Boolean)Releases the unmanaged resources used by the HttpRequestMessage and optionally disposes of the managed resources.
Public methodEqualsDetermines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodToStringReturns a string that represents the current object. (Overrides Object.ToString.)
Top

  NameDescription
Public Extension MethodCreateContent(Type, Object)Overloaded. Creates a new ObjectContent instance associated with the given HttpRequestMessage. (Defined by HttpRequestMessageExtensions.)
Public Extension MethodCreateContent(Type, Object, IEnumerable(Of MediaTypeFormatter), IFormatterSelector)Overloaded. Creates a new ObjectContent instance associated with the given HttpRequestMessage. (Defined by HttpRequestMessageExtensions.)
Public Extension MethodCreateContent(Type, Object, MediaTypeHeaderValue, IEnumerable(Of MediaTypeFormatter), IFormatterSelector)Overloaded. Creates a new ObjectContent instance associated with the given HttpRequestMessage. (Defined by HttpRequestMessageExtensions.)
Public Extension MethodCreateContent(Of T)(T)Overloaded. Creates a new ObjectContent instance associated with the given HttpRequestMessage. (Defined by HttpRequestMessageExtensions.)
Public Extension MethodCreateContent(Of T)(T, IEnumerable(Of MediaTypeFormatter), IFormatterSelector)Overloaded. Creates a new ObjectContent instance associated with the given HttpRequestMessage. (Defined by HttpRequestMessageExtensions.)
Public Extension MethodCreateContent(Of T)(T, MediaTypeHeaderValue, IEnumerable(Of MediaTypeFormatter), IFormatterSelector)Overloaded. Creates a new ObjectContent instance associated with the given HttpRequestMessage. (Defined by HttpRequestMessageExtensions.)
Public Extension MethodCreateResponseOverloaded. Creates the HttpResponseMessage wired up to the associated HttpRequestMessage. (Defined by HttpRequestMessageCommonExtensions.)
Public Extension MethodCreateResponse(HttpStatusCode)Overloaded. Creates the HttpResponseMessage wired up to the associated HttpRequestMessage. (Defined by HttpRequestMessageCommonExtensions.)
Public Extension MethodGetConfigurationRetrieves the HttpConfiguration for the given request. (Defined by HttpRequestMessageExtensions.)
Public Extension MethodGetRouteDataRetrieves the IHttpRouteData for the given request or Nothing if not available. (Defined by HttpRequestMessageExtensions.)
Public Extension MethodGetSynchronizationContextRetrieves the SynchronizationContext for the given request or Nothing if not available. (Defined by HttpRequestMessageExtensions.)
Public Extension MethodGetUserPrincipalRetrieves the IPrincipal for the given request or Nothing if not available. (Defined by HttpRequestMessageExtensions.)
Top

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show: