Dart API Referencedart:ioContentType

ContentType Interface

Representation of a content type.

Extends

HeaderValue

Constructors

Code new ContentType([String primaryType, String subType]) #

Creates a new content type object setting the primary type and sub type. If either is not passed their values will be the empty string.

ContentType([String primaryType, String subType]);

Code new ContentType.fromString(String value) #

Creates a new content type object from parsing a Content-Type header value. As primary type, sub type and parameter names and values are not case sensitive all these values will be converted to lower case. Parsing this string

text/html; charset=utf-8

will create a content type object with primary type text, sub type html and parameter charset with value utf-8.

ContentType.fromString(String value);

Fields

Code String charset #

Gets and sets the character set.

String charset;

Code String primaryType #

Gets and sets the primary type.

String primaryType;

Code String subType #

Gets and sets the sub type.

String subType;

Code String value #

Gets and sets the content type in the form "primaryType/subType".

String value;