HttpWebRequest.TransferEncoding 屬性
定義
取得或設定 Transfer-encoding
HTTP 標頭的值。Gets or sets the value of the Transfer-encoding
HTTP header.
public:
property System::String ^ TransferEncoding { System::String ^ get(); void set(System::String ^ value); };
public string TransferEncoding { get; set; }
member this.TransferEncoding : string with get, set
Public Property TransferEncoding As String
屬性值
Transfer-encoding
HTTP 標頭的值。The value of the Transfer-encoding
HTTP header. 預設值是 null
。The default value is null
.
例外狀況
當 SendChunked 是 false
時,設定 TransferEncoding。TransferEncoding is set when SendChunked is false
.
TransferEncoding 設定為值 "Chunked"。TransferEncoding is set to the value "Chunked".
備註
您 TransferEncoding 必須先將屬性設定為,才可以設定屬性 SendChunked true
。Before you can set the TransferEncoding property, you must first set the SendChunked property to true
. 藉 TransferEncoding 由將它設定為來清除, null
不會影響的值 SendChunked 。Clearing TransferEncoding by setting it to null
has no effect on the value of SendChunked.
指派給屬性的值會 TransferEncoding 取代任何現有的內容。Values assigned to the TransferEncoding property replace any existing contents.
注意
這個屬性的值儲存在 WebHeaderCollection 中。The value for this property is stored in WebHeaderCollection. 如果有設定 WebHeaderCollection,將會遺失屬性值。If WebHeaderCollection is set, the property value is lost.