HttpWebRequest.MediaType Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets or sets the media type of the request.

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

public string MediaType { get; set; }

Property Value

Type: System.String

The media type of the request. The default value is null.

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
Available since 1.1
Return to top
Show: