HttpResponseMessage.TrailingHeaders 屬性

定義

取得包含在 HTTP 回應中的尾端標頭集合。

public:
 property System::Net::Http::Headers::HttpResponseHeaders ^ TrailingHeaders { System::Net::Http::Headers::HttpResponseHeaders ^ get(); };
public System.Net.Http.Headers.HttpResponseHeaders TrailingHeaders { get; }
member this.TrailingHeaders : System.Net.Http.Headers.HttpResponseHeaders
Public ReadOnly Property TrailingHeaders As HttpResponseHeaders

屬性值

HTTP 回應中尾端標頭的集合。

例外狀況

PROTOCOL_ERROR:HTTP/2 回應包含尾端標頭框架中的虛擬標頭。

備註

將會忽略禁止的標頭。

由於尾端標頭會以附加在回應消息結尾的 HTTP 標頭傳送,因此如果存取後置標頭且回應內容尚未完全讀取, TrailingHeaders 則屬性會傳回空 HttpResponseHeaders 的實例。

如需尾端標頭的其他資訊,請參閱 RFC 7230 - 4.1.2。區塊式預告片部分

適用於