Export (0) Print
Expand All

HttpWebRequest.MediaType Property

Gets or sets the media type of the request.

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

member MediaType : string with get, set

Property Value

Type: System.String
The media type of the request. The default value is a null reference (Nothing in Visual Basic).

The value of the MediaType property affects the CharacterSet property. When you set the MediaType in the request, the corresponding media type is chosen from the list of character sets returned in the response Content-type HTTP header.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft