HttpRequestMessage 類別

定義

代表 HTTP 要求訊息。Represents a HTTP request message.

public ref class HttpRequestMessage : IDisposable
public class HttpRequestMessage : IDisposable
type HttpRequestMessage = class
    interface IDisposable
Public Class HttpRequestMessage
Implements IDisposable
繼承
HttpRequestMessage
實作

備註

@No__t-0 類別包含標頭、HTTP 動詞命令,以及可能的資料。The HttpRequestMessage class contains headers, the HTTP verb, and potentially data.

建構函式

HttpRequestMessage()

初始化 HttpRequestMessage 類別的新執行個體。Initializes a new instance of the HttpRequestMessage class.

HttpRequestMessage(HttpMethod, String)

使用 HTTP 方法和要求 HttpRequestMessage,初始化 Uri 類別的新執行個體。Initializes a new instance of the HttpRequestMessage class with an HTTP method and a request Uri.

HttpRequestMessage(HttpMethod, Uri)

使用 HTTP 方法和要求 HttpRequestMessage,初始化 Uri 類別的新執行個體。Initializes a new instance of the HttpRequestMessage class with an HTTP method and a request Uri.

屬性

Content

取得或設定 HTTP 訊息內容。Gets or sets the contents of the HTTP message.

Headers

取得 HTTP 要求標頭的集合。Gets the collection of HTTP request headers.

Method

取得或設定 HTTP 要求訊息使用的 HTTP 方法。Gets or sets the HTTP method used by the HTTP request message.

Properties

取得 HTTP 要求的屬性集。Gets a set of properties for the HTTP request.

RequestUri

取得或設定使用於 HTTP 要求的 UriGets or sets the Uri used for the HTTP request.

Version

取得或設定 HTTP 訊息版本。Gets or sets the HTTP message version.

方法

Dispose()

釋放 Unmanaged 資源,並處置 HttpRequestMessage 所使用的 Managed 資源。Releases the unmanaged resources and disposes of the managed resources used by the HttpRequestMessage.

Dispose(Boolean)

釋放 HttpRequestMessage 所使用的 Unmanaged 資源,並選擇性處置 Managed 資源。Releases the unmanaged resources used by the HttpRequestMessage and optionally disposes of the managed resources.

Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(繼承來源 Object)
GetHashCode()

作為預設雜湊函數。Serves as the default hash function.

(繼承來源 Object)
GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複製。Creates a shallow copy of the current Object.

(繼承來源 Object)
ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

擴充方法

GetUserPrincipal(HttpRequestMessage)

取得與指定之 HTTP 要求訊息相關聯的使用者主體。Gets the user principal associated with the specified HTTP request message.

SetUserPrincipal(HttpRequestMessage, IPrincipal)

取代與指定之 HTTP 要求訊息相關聯的使用者主體。Replaces the user principal associated with the specified HTTP request message.

ToMessage(HttpRequestMessage)

Message 執行個體建立 HttpRequestMessage 執行個體。Creates a Message instance from an HttpRequestMessage instance.

適用於