HttpRequestHeaders 類別

定義

表示要求標頭集合,如 RFC 2616 中的定義。Represents the collection of Request Headers as defined in RFC 2616.

public ref class HttpRequestHeaders sealed : System::Net::Http::Headers::HttpHeaders
public sealed class HttpRequestHeaders : System.Net.Http.Headers.HttpHeaders
type HttpRequestHeaders = class
    inherit HttpHeaders
Public NotInheritable Class HttpRequestHeaders
Inherits HttpHeaders
繼承
HttpRequestHeaders

備註

這個類型衍生自HttpHeadersThis type is derived from HttpHeaders.

屬性

Accept

取得 HTTP 要求的 Accept 標頭值。Gets the value of the Accept header for an HTTP request.

AcceptCharset

取得 HTTP 要求的 Accept-Charset 標頭值。Gets the value of the Accept-Charset header for an HTTP request.

AcceptEncoding

取得 HTTP 要求的 Accept-Encoding 標頭值。Gets the value of the Accept-Encoding header for an HTTP request.

AcceptLanguage

取得 HTTP 要求的 Accept-Language 標頭值。Gets the value of the Accept-Language header for an HTTP request.

Authorization

取得或設定 HTTP 要求的 Authorization 標頭值。Gets or sets the value of the Authorization header for an HTTP request.

CacheControl

取得或設定 HTTP 要求的 Cache-Control 標頭值。Gets or sets the value of the Cache-Control header for an HTTP request.

Connection

取得 HTTP 要求的 Connection 標頭值。Gets the value of the Connection header for an HTTP request.

ConnectionClose

取得或設定一個值,以指示 HTTP 要求的 Connection 標頭是否包含 Close。Gets or sets a value that indicates if the Connection header for an HTTP request contains Close.

Date

取得或設定 HTTP 要求的 Date 標頭值。Gets or sets the value of the Date header for an HTTP request.

Expect

取得 HTTP 要求的 Expect 標頭值。Gets the value of the Expect header for an HTTP request.

ExpectContinue

取得或設定值,指示 HTTP 要求的 Expect 標頭是否包含 Continue。Gets or sets a value that indicates if the Expect header for an HTTP request contains Continue.

From

取得或設定 HTTP 要求的 From 標頭值。Gets or sets the value of the From header for an HTTP request.

Host

取得或設定 HTTP 要求的 Host 標頭值。Gets or sets the value of the Host header for an HTTP request.

IfMatch

取得 HTTP 要求的 If-Match 標頭值。Gets the value of the If-Match header for an HTTP request.

IfModifiedSince

取得或設定 HTTP 要求的 If-Modified-Since 標頭值。Gets or sets the value of the If-Modified-Since header for an HTTP request.

IfNoneMatch

取得 HTTP 要求的 If-None-Match 標頭值。Gets the value of the If-None-Match header for an HTTP request.

IfRange

取得或設定 HTTP 要求的 If-Range 標頭值。Gets or sets the value of the If-Range header for an HTTP request.

IfUnmodifiedSince

取得或設定 HTTP 要求的 If-Unmodified-Since 標頭值。Gets or sets the value of the If-Unmodified-Since header for an HTTP request.

MaxForwards

取得或設定 HTTP 要求的 Max-Forwards 標頭值。Gets or sets the value of the Max-Forwards header for an HTTP request.

Pragma

取得 HTTP 要求的 Pragma 標頭值。Gets the value of the Pragma header for an HTTP request.

ProxyAuthorization

取得或設定 HTTP 要求的 Proxy-Authorization 標頭值。Gets or sets the value of the Proxy-Authorization header for an HTTP request.

Range

取得或設定 HTTP 要求的 Range 標頭值。Gets or sets the value of the Range header for an HTTP request.

Referrer

取得或設定 HTTP 要求的 Referer 標頭值。Gets or sets the value of the Referer header for an HTTP request.

TE

取得 HTTP 要求的 TE 標頭值。Gets the value of the TE header for an HTTP request.

Trailer

取得 HTTP 要求的 Trailer 標頭值。Gets the value of the Trailer header for an HTTP request.

TransferEncoding

取得 HTTP 要求的 Transfer-Encoding 標頭值。Gets the value of the Transfer-Encoding header for an HTTP request.

TransferEncodingChunked

取得或設定一個值,以指示 HTTP 要求的 Transfer-Encoding 標頭是否包含區塊。Gets or sets a value that indicates if the Transfer-Encoding header for an HTTP request contains chunked.

Upgrade

取得 HTTP 要求的 Upgrade 標頭值。Gets the value of the Upgrade header for an HTTP request.

UserAgent

取得 HTTP 要求的 User-Agent 標頭值。Gets the value of the User-Agent header for an HTTP request.

Via

取得 HTTP 要求的 Via 標頭值。Gets the value of the Via header for an HTTP request.

Warning

取得 HTTP 要求的 Warning 標頭值。Gets the value of the Warning header for an HTTP request.

方法

Add(String, IEnumerable<String>)

將指定的標頭及其值加入至 HttpHeaders 集合中。Adds the specified header and its values into the HttpHeaders collection.

(繼承來源 HttpHeaders)
Add(String, String)

將指定的標頭及其值加入至 HttpHeaders 集合中。Adds the specified header and its value into the HttpHeaders collection.

(繼承來源 HttpHeaders)
Clear()

移除 HttpHeaders 集合中的所有標頭。Removes all headers from the HttpHeaders collection.

(繼承來源 HttpHeaders)
Contains(String)

傳回在 HttpHeaders 集合中是否有特定的標頭。Returns if a specific header exists in the HttpHeaders collection.

(繼承來源 HttpHeaders)
Equals(Object)

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

(繼承來源 Object)
GetEnumerator()

傳回可以逐一查看 HttpHeaders 執行個體的列舉值。Returns an enumerator that can iterate through the HttpHeaders instance.

(繼承來源 HttpHeaders)
GetHashCode()

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

(繼承來源 Object)
GetType()

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

(繼承來源 Object)
GetValues(String)

傳回 HttpHeaders 集合中儲存之指定標頭的所有標頭值。Returns all header values for a specified header stored in the HttpHeaders collection.

(繼承來源 HttpHeaders)
MemberwiseClone()

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

(繼承來源 Object)
Remove(String)

HttpHeaders 集合中移除指定的標頭。Removes the specified header from the HttpHeaders collection.

(繼承來源 HttpHeaders)
ToString()

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

(繼承來源 HttpHeaders)
TryAddWithoutValidation(String, IEnumerable<String>)

傳回的值指示指定的標頭及其值是否未驗證提供的資訊便加入 HttpHeaders 集合。Returns a value that indicates whether the specified header and its values were added to the HttpHeaders collection without validating the provided information.

(繼承來源 HttpHeaders)
TryAddWithoutValidation(String, String)

傳回的值指示指定的標頭及其值是否未驗證提供的資訊便加入 HttpHeaders 集合。Returns a value that indicates whether the specified header and its value were added to the HttpHeaders collection without validating the provided information.

(繼承來源 HttpHeaders)
TryGetValues(String, IEnumerable<String>)

如果指定的標頭和指定值儲存於 HttpHeaders 集合中,則會傳回。Return if a specified header and specified values are stored in the HttpHeaders collection.

(繼承來源 HttpHeaders)

明確介面實作

IEnumerable.GetEnumerator()

取得可以逐一查看 HttpHeaders 的列舉程式。Gets an enumerator that can iterate through a HttpHeaders.

(繼承來源 HttpHeaders)

擴充方法

CopyToDataTable<T>(IEnumerable<T>)

根據輸入 DataTable 物件 (其中泛型參數 TDataRow) 傳回包含 IEnumerable<T> 物件複本的 DataRowReturns a DataTable that contains copies of the DataRow objects, given an input IEnumerable<T> object where the generic parameter T is DataRow.

CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption)

根據輸入 DataRow 物件 (其中泛型參數 TDataTable),將 IEnumerable<T> 物件複製到指定的 DataRowCopies DataRow objects to the specified DataTable, given an input IEnumerable<T> object where the generic parameter T is DataRow.

CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler)

根據輸入 DataRow 物件 (其中泛型參數 TDataTable),將 IEnumerable<T> 物件複製到指定的 DataRowCopies DataRow objects to the specified DataTable, given an input IEnumerable<T> object where the generic parameter T is DataRow.

Cast<TResult>(IEnumerable)

IEnumerable 的項目轉換成指定的型別。Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable)

根據指定的型別來篩選 IEnumerable 的項目。Filters the elements of an IEnumerable based on a specified type.

AsParallel(IEnumerable)

啟用查詢的平行化作業。Enables parallelization of a query.

AsQueryable(IEnumerable)

IEnumerable 轉換成 IQueryableConverts an IEnumerable to an IQueryable.

Ancestors<T>(IEnumerable<T>)

傳回包含來源集合中每個節點祖系的項目集合。Returns a collection of elements that contains the ancestors of every node in the source collection.

Ancestors<T>(IEnumerable<T>, XName)

傳回包含來源集合中每個節點祖系的已篩選項目集合。Returns a filtered collection of elements that contains the ancestors of every node in the source collection. 集合中只會包含具有相符之 XName 的項目。Only elements that have a matching XName are included in the collection.

DescendantNodes<T>(IEnumerable<T>)

傳回來源集合中每個文件和項目之子代節點的集合。Returns a collection of the descendant nodes of every document and element in the source collection.

Descendants<T>(IEnumerable<T>)

傳回包含來源集合中每個項目和文件之子代項目的項目集合。Returns a collection of elements that contains the descendant elements of every element and document in the source collection.

Descendants<T>(IEnumerable<T>, XName)

傳回已篩選的項目集合,其中包含來源集合中每個項目和文件的子代項目。Returns a filtered collection of elements that contains the descendant elements of every element and document in the source collection. 集合中只會包含具有相符之 XName 的項目。Only elements that have a matching XName are included in the collection.

Elements<T>(IEnumerable<T>)

傳回來源集合中每個項目和文件的子項目集合。Returns a collection of the child elements of every element and document in the source collection.

Elements<T>(IEnumerable<T>, XName)

傳回來源集合中每個項目和文件的已篩選子項目集合。Returns a filtered collection of the child elements of every element and document in the source collection. 集合中只會包含具有相符之 XName 的項目。Only elements that have a matching XName are included in the collection.

InDocumentOrder<T>(IEnumerable<T>)

傳回包含來源集合中所有節點的節點集合,依據文件順序來排序。Returns a collection of nodes that contains all nodes in the source collection, sorted in document order.

Nodes<T>(IEnumerable<T>)

傳回來源集合中每個文件和項目的子節點集合。Returns a collection of the child nodes of every document and element in the source collection.

Remove<T>(IEnumerable<T>)

在來源集合中,從每一個節點的父節點移除這些節點。Removes every node in the source collection from its parent node.

適用於