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

屬性值

String

Transfer-encoding HTTP 標頭的值。The value of the Transfer-encoding HTTP header. 預設值是 nullThe default value is null.

例外狀況

SendChunkedfalse 時,設定 TransferEncodingTransferEncoding is set when SendChunked is false.

TransferEncoding 設定為值 "Chunked"。TransferEncoding is set to the value "Chunked".

備註

TransferEncoding 必須先將屬性設定為,才可以設定屬性 SendChunked trueBefore you can set the TransferEncoding property, you must first set the SendChunked property to true. TransferEncoding 由將它設定為來清除, null 不會影響的值 SendChunkedClearing 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.

適用於