Share via


ResponseHeaders 類別

定義

強型別 HTTP 回應標頭。

public ref class ResponseHeaders
public class ResponseHeaders
type ResponseHeaders = class
Public Class ResponseHeaders
繼承
ResponseHeaders

建構函式

ResponseHeaders(IHeaderDictionary)

初始化 ResponseHeaders 的新執行個體。

屬性

CacheControl

取得或設定 Cache-Control HTTP 回應的標頭。

ContentDisposition

取得或設定 Content-Disposition HTTP 回應的標頭。

ContentLength

取得或設定 Content-Length HTTP 回應的標頭。

ContentRange

取得或設定 Content-Range HTTP 回應的標頭。

ContentType

取得或設定 Content-Type HTTP 回應的標頭。

Date

取得或設定 Date HTTP 回應的標頭。

ETag

取得或設定 ETag HTTP 回應的標頭。

Expires

取得或設定 Expires HTTP 回應的標頭。

Headers

取得備份回應標頭字典。

LastModified

取得或設定 Last-Modified HTTP 回應的標頭。

Location

取得或設定 Location HTTP 回應的標頭。

SetCookie

取得或設定 Set-Cookie HTTP 回應的標頭。

方法

Append(String, Object)

附加標頭名稱和值。

AppendList<T>(String, IList<T>)

附加標頭名稱及其值。

Get<T>(String)

使用 取得標頭 name 的值。

GetList<T>(String)

使用 取得標頭 name 的值。

Set(String, Object)

設定標頭值。

SetList<T>(String, IList<T>)

設定指定的標頭及其值。

適用於