共用方式為


DataServiceRequestArgs.Headers 屬性

取得要求訊息中的標頭。

命名空間:  System.Data.Services.Client
組件:  Microsoft.Data.Services.Client (在 Microsoft.Data.Services.Client.dll 中)

語法

'宣告
Public ReadOnly Property Headers As Dictionary(Of String, String)
    Get
'用途
Dim instance As DataServiceRequestArgs
Dim value As Dictionary(Of String, String)

value = instance.Headers
public Dictionary<string, string> Headers { get; }
public:
property Dictionary<String^, String^>^ Headers {
    Dictionary<String^, String^>^ get ();
}
member Headers : Dictionary<string, string>
function get Headers () : Dictionary<String, String>

屬性值

型別:System.Collections.Generic.Dictionary<String, String>
要求訊息中的標頭。

備註

回應是 Dictionary<TKey, TValue> 物件,它包含要求中每個標頭的索引鍵值組字串。

不會對 Headers 屬性中的標頭執行任何驗證。 因此,切勿以可能會變更要求意義的方式變更 HTTP 標頭。

請參閱

參考

DataServiceRequestArgs 類別

System.Data.Services.Client 命名空間