HttpRequestMessage HttpRequestMessage HttpRequestMessage HttpRequestMessage Class

Definition

Represents a HTTP request message.

public ref class HttpRequestMessage : IDisposable
public class HttpRequestMessage : IDisposable
type HttpRequestMessage = class
    interface IDisposable
Public Class HttpRequestMessage
Implements IDisposable
Inheritance
HttpRequestMessageHttpRequestMessageHttpRequestMessageHttpRequestMessage
Implements

Remarks

The HttpRequestMessage class contains headers, the HTTP verb, and potentially data.

Constructors

HttpRequestMessage() HttpRequestMessage() HttpRequestMessage() HttpRequestMessage()

Initializes a new instance of the HttpRequestMessage class.

HttpRequestMessage(HttpMethod, String) HttpRequestMessage(HttpMethod, String) HttpRequestMessage(HttpMethod, String) HttpRequestMessage(HttpMethod, String)

Initializes a new instance of the HttpRequestMessage class with an HTTP method and a request Uri.

HttpRequestMessage(HttpMethod, Uri) HttpRequestMessage(HttpMethod, Uri) HttpRequestMessage(HttpMethod, Uri) HttpRequestMessage(HttpMethod, Uri)

Initializes a new instance of the HttpRequestMessage class with an HTTP method and a request Uri.

Properties

Content Content Content Content

Gets or sets the contents of the HTTP message.

Headers Headers Headers Headers

Gets the collection of HTTP request headers.

Method Method Method Method

Gets or sets the HTTP method used by the HTTP request message.

Properties Properties Properties Properties

Gets a set of properties for the HTTP request.

RequestUri RequestUri RequestUri RequestUri

Gets or sets the Uri used for the HTTP request.

Version Version Version Version

Gets or sets the HTTP message version.

Methods

Dispose() Dispose() Dispose() Dispose()

Releases the unmanaged resources and disposes of the managed resources used by the HttpRequestMessage.

Dispose(Boolean) Dispose(Boolean) Dispose(Boolean) Dispose(Boolean)

Releases the unmanaged resources used by the HttpRequestMessage and optionally disposes of the managed resources.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

Extension Methods

GetUserPrincipal(HttpRequestMessage) GetUserPrincipal(HttpRequestMessage) GetUserPrincipal(HttpRequestMessage) GetUserPrincipal(HttpRequestMessage)

Gets the user principal associated with the specified HTTP request message.

SetUserPrincipal(HttpRequestMessage, IPrincipal) SetUserPrincipal(HttpRequestMessage, IPrincipal) SetUserPrincipal(HttpRequestMessage, IPrincipal) SetUserPrincipal(HttpRequestMessage, IPrincipal)

Replaces the user principal associated with the specified HTTP request message.

ToMessage(HttpRequestMessage) ToMessage(HttpRequestMessage) ToMessage(HttpRequestMessage) ToMessage(HttpRequestMessage)

Creates a Message instance from an HttpRequestMessage instance.

Applies to