HttpRequestMessageExtensions Class
Provides extension methods for HttpRequestMessage.
Inheritance Hierarchy
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)
Syntax
'Declaration
<ExtensionAttribute> _
Public NotInheritable Class HttpRequestMessageExtensions
'Usage
public static class HttpRequestMessageExtensions
[ExtensionAttribute]
public ref class HttpRequestMessageExtensions abstract sealed
[<AbstractClassAttribute>]
[<SealedAttribute>]
type HttpRequestMessageExtensions = class end
public final class HttpRequestMessageExtensions
The HttpRequestMessageExtensions type exposes the following members.
Methods
Name | Description | |
---|---|---|
CreateErrorResponse(HttpRequestMessage, InvalidByteRangeException) | ||
CreateErrorResponse(HttpRequestMessage, HttpStatusCode, Exception) | Creates an HttpResponseMessage that represents an exception. | |
CreateErrorResponse(HttpRequestMessage, HttpStatusCode, String) | Creates an HttpResponseMessage that represents an error message. | |
CreateErrorResponse(HttpRequestMessage, HttpStatusCode, HttpError) | Creates an HttpResponseMessage that represents an error. | |
CreateErrorResponse(HttpRequestMessage, HttpStatusCode, ModelStateDictionary) | Creates an HttpResponseMessage that represents an error in the model state. | |
CreateErrorResponse(HttpRequestMessage, HttpStatusCode, String, Exception) | Creates an HttpResponseMessage that represents an exception with an error message. | |
CreateResponse(HttpRequestMessage) | ||
CreateResponse(HttpRequestMessage, HttpStatusCode) | ||
CreateResponse<T>(HttpRequestMessage, HttpStatusCode, T) | Creates an HttpResponseMessage wired up to the associated HttpRequestMessage. | |
CreateResponse<T>(HttpRequestMessage, HttpStatusCode, T, MediaTypeFormatter) | Creates an HttpResponseMessage wired up to the associated HttpRequestMessage. | |
CreateResponse<T>(HttpRequestMessage, HttpStatusCode, T, MediaTypeHeaderValue) | Creates an HttpResponseMessage wired up to the associated HttpRequestMessage. | |
CreateResponse<T>(HttpRequestMessage, HttpStatusCode, T, String) | Creates an HttpResponseMessage wired up to the associated HttpRequestMessage. | |
CreateResponse<T>(HttpRequestMessage, HttpStatusCode, T, HttpConfiguration) | Creates an HttpResponseMessage wired up to the associated HttpRequestMessage. | |
CreateResponse<T>(HttpRequestMessage, HttpStatusCode, T, MediaTypeFormatter, MediaTypeHeaderValue) | Creates an HttpResponseMessage wired up to the associated HttpRequestMessage. | |
CreateResponse<T>(HttpRequestMessage, HttpStatusCode, T, MediaTypeFormatter, String) | Creates an HttpResponseMessage wired up to the associated HttpRequestMessage. | |
DisposeRequestResources | Disposes of all tracked resources associated with the request which were added via the RegisterForDispose method. | |
GetClientCertificate | Gets the current X.509 certificate from the given HTTP request. | |
GetConfiguration | Retrieves the HttpConfiguration for the given request. | |
GetCorrelationId | Retrieves 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. | |
GetDependencyScope | Retrieves the IDependencyScope for the given request or null reference (Nothing in Visual Basic) if not available. | |
GetQueryNameValuePairs | Gets the parsed query string as a collection of key-value pairs. | |
GetRouteData | Retrieves the IHttpRouteData for the given request or null reference (Nothing in Visual Basic) if not available. | |
GetSecurityMessageProperty | Gets the current SecurityMessageProperty stored in the request message properties for the given request. | |
GetSynchronizationContext | Retrieves the SynchronizationContext for the given request or null reference (Nothing in Visual Basic) if not available. | |
GetUrlHelper | Gets a UrlHelper instance for an HTTP request. | |
RegisterForDispose | Adds the given resource to a list of resources that will be disposed by a host once the request is disposed. |
Top
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.