Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

HttpRequestMessageExtensions Class

Provides extension methods for HttpRequestMessage.

System.Object
  System.Net.Http.HttpRequestMessageExtensions

Namespace:  System.Net.Http
Assemblies:   System.Web.Http.SelfHost (in System.Web.Http.SelfHost.dll)
  System.Web.Http (in System.Web.Http.dll)
  System.Net.Http.Formatting (in System.Net.Http.Formatting.dll)

'Declaration
<EditorBrowsableAttribute(EditorBrowsableState.Never)> _
<ExtensionAttribute> _
Public NotInheritable Class HttpRequestMessageExtensions
'Usage

The HttpRequestMessageExtensions type exposes the following members.

  NameDescription
Public methodStatic memberCreateErrorResponse(HttpRequestMessage, InvalidByteRangeException)
Public methodStatic memberCreateErrorResponse(HttpRequestMessage, HttpStatusCode, Exception)Creates an HttpResponseMessage that represents an exception.
Public methodStatic memberCreateErrorResponse(HttpRequestMessage, HttpStatusCode, String)Creates an HttpResponseMessage that represents an error message.
Public methodStatic memberCreateErrorResponse(HttpRequestMessage, HttpStatusCode, HttpError)Creates an HttpResponseMessage that represents an error.
Public methodStatic memberCreateErrorResponse(HttpRequestMessage, HttpStatusCode, ModelStateDictionary)Creates an HttpResponseMessage that represents an error in the model state.
Public methodStatic memberCreateErrorResponse(HttpRequestMessage, HttpStatusCode, String, Exception)Creates an HttpResponseMessage that represents an exception with an error message.
Public methodStatic memberCreateResponse(HttpRequestMessage)
Public methodStatic memberCreateResponse(HttpRequestMessage, HttpStatusCode)
Public methodStatic memberCreateResponse(Of T)(HttpRequestMessage, T)
Public methodStatic memberCreateResponse(Of T)(HttpRequestMessage, HttpStatusCode, T)Creates an HttpResponseMessage wired up to the associated HttpRequestMessage.
Public methodStatic memberCreateResponse(Of T)(HttpRequestMessage, HttpStatusCode, T, MediaTypeFormatter)Creates an HttpResponseMessage wired up to the associated HttpRequestMessage.
Public methodStatic memberCreateResponse(Of T)(HttpRequestMessage, HttpStatusCode, T, MediaTypeHeaderValue)Creates an HttpResponseMessage wired up to the associated HttpRequestMessage.
Public methodStatic memberCreateResponse(Of T)(HttpRequestMessage, HttpStatusCode, T, String)Creates an HttpResponseMessage wired up to the associated HttpRequestMessage.
Public methodStatic memberCreateResponse(Of T)(HttpRequestMessage, HttpStatusCode, T, HttpConfiguration)Creates an HttpResponseMessage wired up to the associated HttpRequestMessage.
Public methodStatic memberCreateResponse(Of T)(HttpRequestMessage, HttpStatusCode, T, MediaTypeFormatter, MediaTypeHeaderValue)Creates an HttpResponseMessage wired up to the associated HttpRequestMessage.
Public methodStatic memberCreateResponse(Of T)(HttpRequestMessage, HttpStatusCode, T, MediaTypeFormatter, String)Creates an HttpResponseMessage wired up to the associated HttpRequestMessage.
Public methodStatic memberDisposeRequestResourcesDisposes of all tracked resources associated with the request which were added via the RegisterForDispose method.
Public methodStatic memberGetActionDescriptor
Public methodStatic memberGetClientCertificateGets the current X.509 certificate from the given HTTP request.
Public methodStatic memberGetConfigurationRetrieves the HttpConfiguration for the given request.
Public methodStatic memberGetCorrelationIdRetrieves the Guid which has been assigned as the correlation ID associated with the given request. The value will be created and set the first time this method is called.
Public methodStatic memberGetDependencyScopeRetrieves the IDependencyScope for the given request or Nothing if not available.
Public methodStatic memberGetQueryNameValuePairsGets the parsed query string as a collection of key-value pairs.
Public methodStatic memberGetRequestContext
Public methodStatic memberGetResourcesForDisposal
Public methodStatic memberGetRouteDataRetrieves the IHttpRouteData for the given request or Nothing if not available.
Public methodStatic memberGetSecurityMessagePropertyGets the current SecurityMessageProperty stored in the request message properties for the given request.
Public methodStatic memberGetSynchronizationContextRetrieves the SynchronizationContext for the given request or Nothing if not available.
Public methodStatic memberGetUrlHelperGets a UrlHelper instance for an HTTP request.
Public methodStatic memberIsBatchRequest
Public methodStatic memberIsLocal
Public methodStatic memberRegisterForDispose(HttpRequestMessage, IEnumerable(Of IDisposable))
Public methodStatic memberRegisterForDispose(HttpRequestMessage, IDisposable)Adds the given resource to a list of resources that will be disposed by a host once the request is disposed.
Public methodStatic memberSetConfiguration
Public methodStatic memberSetRequestContext
Public methodStatic memberSetRouteData
Public methodStatic memberShouldIncludeErrorDetail
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.
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft