ResponseInformation.Headers 屬性

定義

取得伺服器傳送的所有回應標頭。

public:
 property IMapView<Platform::String ^, Platform::String ^> ^ Headers { IMapView<Platform::String ^, Platform::String ^> ^ get(); };
IMapView<winrt::hstring, winrt::hstring const&> Headers();
public IReadOnlyDictionary<string,string> Headers { get; }
var iMapView = responseInformation.headers;
Public ReadOnly Property Headers As IReadOnlyDictionary(Of String, String)

屬性值

IMapView<String,String>

IReadOnlyDictionary<String,String>

IMapView<Platform::String,Platform::String>

IMapView<winrt::hstring,winrt::hstring>

包含伺服器傳送的所有回應標頭。

備註

Headers屬性所傳回的字典會將標頭名稱儲存 (做為其索引鍵) ,在伺服器和/或 HTTP 版本之間可能會有所不同。 字典也會以區分大小寫方式執行索引鍵查閱。 如果伺服器傳送標頭名稱 Content-Length ,則字典會以這種方式儲存它,而且您必須使用該與查閱索引鍵相同的大小寫。 標頭 會完全儲存線上路上。

適用於

另請參閱