Skip to main content
HttpMediaTypeHeaderValue.MediaType | mediaType property

Applies to Windows and Windows Phone

Gets or sets the media-type of the entity-body used in the Content-Type HTTP header.

Syntax


var mediaType = httpMediaTypeHeaderValue.mediaType;
httpMediaTypeHeaderValue.mediaType = mediaType;

public string MediaType { get; set; }

Public Property MediaType As String

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

Property value

Type: String [JavaScript] | System.String [.NET] | Platform::String [C++]

The media-type of the entity-body.

Remarks

Internet media types should be registered with IANA. Media type registrations are listed in categories by IANA as MIME Media Types.

Requirements

Minimum supported client

Windows 8.1

Minimum supported server

Windows Server 2012 R2

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Namespace

Windows.Web.Http.Headers
Windows::Web::Http::Headers [C++]

Metadata

Windows.winmd

See also

HttpMediaTypeHeaderValue