Export (0) Print
Expand All

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
<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, 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 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 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 memberRegisterForDisposeAdds the given resource to a list of resources that will be disposed by a host once the request is disposed.
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:
© 2014 Microsoft