Share via


HttpRequestMessageExtensions Class

 

Provides extension methods for the HttpRequestMessage class.

Namespace:   System.Web.Http.OData.Extensions
Assembly:  System.Web.Http.OData (in System.Web.Http.OData.dll)

Inheritance Hierarchy

System.Object
  System.Web.Http.OData.Extensions.HttpRequestMessageExtensions

Syntax

[EditorBrowsableAttribute(EditorBrowsableState.Never)]
public static class HttpRequestMessageExtensions
[EditorBrowsableAttribute(EditorBrowsableState::Never)]
[ExtensionAttribute]
public ref class HttpRequestMessageExtensions abstract sealed 
[<AbstractClass>]
[<Sealed>]
[<EditorBrowsableAttribute(EditorBrowsableState.Never)>]
type HttpRequestMessageExtensions = class end
<EditorBrowsableAttribute(EditorBrowsableState.Never)>
<ExtensionAttribute>
Public NotInheritable Class HttpRequestMessageExtensions

Methods

Name Description
System_CAPS_pubmethodSystem_CAPS_static CreateErrorResponse(HttpRequestMessage, HttpStatusCode, ODataError)

Helper method that performs content negotiation and creates a HttpResponseMessage representing an error with an instance of ObjectContent<T> wrapping oDataError as the content. If no formatter is found, this method returns a response with status 406 NotAcceptable.

This method requires that request has been associated with an instance of HttpConfiguration.

System_CAPS_pubmethodSystem_CAPS_static GetETag(HttpRequestMessage, EntityTagHeaderValue)

Gets the OData ETag from the given request.

System_CAPS_pubmethodSystem_CAPS_static GetETag<TEntity>(HttpRequestMessage, EntityTagHeaderValue)

Gets the ETag<TEntity> from the given request.

System_CAPS_pubmethodSystem_CAPS_static ODataProperties(HttpRequestMessage)

Gets the HttpRequestMessageProperties instance containing OData methods and properties for given HttpRequestMessage.

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.

See Also

System.Web.Http.OData.Extensions Namespace

Return to top