Share via


WebRequest.ContentType Property

When overridden in a descendant class, gets or sets the content type of the request data being sent.

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

Syntax

public virtual string ContentType { get; set; }

Property Value

The content type of the request data.

Remarks

The content length is the length of the message with the verb. It is useful only with verbs that actually support a message, such as POST; it is not used for the GET verb.

Version Information

Available in the .NET Micro Framework versions 4.0, 4.1, and 4.2.

See Also

Reference

WebRequest Class
WebRequest Members
System.Net Namespace