ContentType Interface
Representation of a content type.
Extends
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);