Share via


HttpRequestMessageExtensions Class

Definition

Extension methods for System.Net.Http.HttpRequestMessage providing various utilities.

[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public static class HttpRequestMessageExtensions
[<System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)>]
type HttpRequestMessageExtensions = class
Public Module HttpRequestMessageExtensions
Inheritance
System.Object
HttpRequestMessageExtensions
Attributes
System.ComponentModel.EditorBrowsableAttribute

Methods

CreateBadRequestResponse(HttpRequestMessage, String, Object[])

Creates an System.Net.Http.HttpResponseMessage with an System.Net.HttpStatusCode.BadRequest status code and a System.Web.Http.HttpError containing the provided message as HTTP response body.

CreateBadRequestResponse(HttpRequestMessage)

Creates an System.Net.Http.HttpResponseMessage with an System.Net.HttpStatusCode.BadRequest status code and a default System.Web.Http.HttpError as HTTP response body.

CreateNotFoundResponse(HttpRequestMessage, String, Object[])

Creates an System.Net.Http.HttpResponseMessage with an System.Net.HttpStatusCode.NotFound status code and a System.Web.Http.HttpError containing the provided message as HTTP response body.

CreateNotFoundResponse(HttpRequestMessage)

Creates an System.Net.Http.HttpResponseMessage with an System.Net.HttpStatusCode.NotFound status code and a default System.Web.Http.HttpError as HTTP response body.

CreateUnauthorizedResponse(HttpRequestMessage, String, Object[])

Creates an System.Net.Http.HttpResponseMessage with an System.Net.HttpStatusCode.Unauthorized status code and a System.Web.Http.HttpError containing the provided message as HTTP response body.

CreateUnauthorizedResponse(HttpRequestMessage)

Creates an System.Net.Http.HttpResponseMessage with an System.Net.HttpStatusCode.Unauthorized status code and a default System.Web.Http.HttpError as HTTP response body.

GetAuthenticationManager(HttpRequestMessage)

Returns the Microsoft.Owin.Security.IAuthenticationManager for the specified request.

IsIfNoneMatch(HttpRequestMessage, EntityTagHeaderValue)

Checks if the request is conditional having a If-None-Match HTTP header field with a value that matches the current value. In the case of true this can be used to indicate that a 304 (Not Modified) or a 412 (Precondition Failed) status code should be used.

Applies to