Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

HttpWebRequest::MediaType Property

 

Gets or sets the media type of the request.

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

public:
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
Show:
© 2017 Microsoft