Share via


HttpWebRequest.TransferEncoding Property

Gets or sets the TransferEncoding HTTP header.

Namespace: System.Net
Assembly: System (in system.dll)

Syntax

public string TransferEncoding { get; set; }

Property Value

The value of the Transfer-encoding HTTP header. The default value is null.

Remarks

null clears the transfer encoding except for the Chunked setting.

Exceptions

Exception type Condition
ArgumentException Adding "Encoding" and setting "chunked" is not permitted. Per the HTTP Spec, using additional encoding types requires that the current mode be Chunked.
InvalidOperationException The current mode is not HttpWebRequest.SendChunked. Per the HTTP Spec, using additional encoding types requires that the current mode be Chunked.

Version Information

Available in the .NET Micro Framework versions 4.0 and 4.1.

See Also

Reference

HttpWebRequest Class
HttpWebRequest Members
System.Net Namespace