Mono Class Library: System.Net.HttpWebRequest Overview | Members

System.Net.HttpWebRequest.ContentType Property

Gets or sets the value of the Content-type HTTP header of the current instance. [Edit]

public override string ContentType { set; get; }

Value

The value of the Content-type HTTP header of the current instance. The default value is null . [Edit]

Remarks

The HttpWebRequest.ContentType property contains the media type of the current instance. Values assigned to the HttpWebRequest.ContentType property replace any existing contents when the request sends the Content-type HTTP header.

Note:

To clear the Content-type HTTP header, set the HttpWebRequest.ContentType property to null .

For additional information see section 14.17 of IETF RFC 2616 - HTTP/1.1.

This property overrides WebRequest.ContentType.

[Edit]

Requirements

Namespace: System.Net
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0