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,则字典以这种方式存储它,并且你需要使用与查找键相同的大小写。 标头 与它们通过线路时完全相同的存储。

适用于

另请参阅