MediaType Property

HttpWebRequest::MediaType Property


Gets or sets the media type of the request.

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

property String^ MediaType {
	String^ get();
	void set(String^ value);

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
© 2016 Microsoft