System::Net::Http::Headers::HttpResponseHeaders 类

HttpResponseHeaders class

表示 ‘Response’ 标头的集合。此类的对象只能使用 System::MakeObject() 函数分配。切勿在栈上或使用 new 运算符创建此类型的实例,因为这会导致运行时错误和/或断言故障。始终将此类包装在 System::SmartPtr 指针中,并使用该指针将其作为参数传递给函数。

class HttpResponseHeaders : public System::Net::Http::Headers::HttpHeaders

方法

方法描述
AddHeaders(System::SharedPtr<HttpHeaders>) override将指定的 HttpHeaders 类实例与当前实例连接。
static AddKnownHeaders(System::SharedPtr<Collections::Generic::HashSet<String>>)将已知的标头添加到指定的集合中。
get_AcceptRanges()RTTI 信息。
get_Age()获取 ‘Age’ 标头的值。
get_CacheControl()获取 ‘Cache-Control’ 标头的值。
get_Connection()返回 ‘Connection’ 标头的值。
get_ConnectionClose()获取一个值,指示 ‘Connection’ 标头的值是否包含 ‘Close’。
get_Date()获取 ‘Date’ 标头的值。
get_ETag()获取 ‘ETag’ 头的值。
get_Location()获取 ‘Location’ 标头的值。
get_Pragma()返回 ‘Pragma’ 标头的值。
get_ProxyAuthenticate()返回 ‘Proxy-Authenticate’ 标头的值。
get_RetryAfter()获取 ‘Retry-After’ 标头的值。
get_Server()返回 ‘Server’ 标头的值。
get_Trailer()返回 ‘Trailer’ 标头的值。
get_TransferEncoding()返回 ‘Transfer-Encoding’ 标头的值。
get_TransferEncodingChunked()获取一个值,指示 ‘Transfer-Encoding’ 标头的值是否包含 ‘Chunked’。
get_Upgrade()返回 ‘Upgrade’ 标头的值。
get_Vary()返回 ‘Vary’ 标头的值。
get_Via()返回 ‘Via’ 标头的值。
get_Warning()返回 ‘Warning’ 标头的值。
get_WwwAuthenticate()返回 ‘WWW-Authenticate’ 标头的值。
HttpResponseHeaders()构造一个新实例。
set_Age(Nullable<TimeSpan>)设置 ‘Age’ 标头的值。
set_CacheControl(System::SharedPtr<CacheControlHeaderValue>)设置 ‘Cache-Control’ 标头的值。
set_ConnectionClose(Nullable<bool>)设置一个值,指示 ‘Connection’ 标头的值是否包含 ‘Close’。
set_Date(Nullable<DateTimeOffset>)设置 ‘Date’ 标头的值。
set_ETag(System::SharedPtr<EntityTagHeaderValue>)设置 ‘ETag’ 标头的值。
set_Location(System::SharedPtr<Uri>)设置 ‘Location’ 标头的值。
set_RetryAfter(System::SharedPtr<RetryConditionHeaderValue>)设置 ‘Retry-After’ 标头的值。
set_TransferEncodingChunked(Nullable<bool>)设置一个值,指示 ‘Transfer-Encoding’ 标头的值是否包含 ‘Chunked’。

另见