Export (0) Print
Expand All

HttpWebRequest.TransferEncoding Property

Gets or sets the value of the Transfer-encoding HTTP header.

[Visual Basic]
Public Property TransferEncoding As String
[C#]
public string TransferEncoding {get; set;}
[C++]
public: __property String* get_TransferEncoding();
public: __property void set_TransferEncoding(String*);
[JScript]
public function get TransferEncoding() : String;
public function set TransferEncoding(String);

Property Value

The value of the Transfer-encoding HTTP header. The default value is a null reference (Nothing in Visual Basic).

Exceptions

Exception Type Condition
InvalidOperationException TransferEncoding is set when SendChunked is false.
ArgumentException TransferEncoding is set to the value "Chunked".

Remarks

Before you can set the TransferEncoding property, you must first set the SendChunked property to true. Clearing TransferEncoding by setting it to a null reference (Nothing in Visual Basic) has no effect on the value of SendChunked.

Values assigned to the TransferEncoding property replace any existing contents.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework, Common Language Infrastructure (CLI) Standard

See Also

HttpWebRequest Class | HttpWebRequest Members | System.Net Namespace

Show:
© 2014 Microsoft