ContentType class

The Content-Type entity header is used to indicate the media type of the resource.

Constructors

ContentType(MimeType mediaType, String? charset)
Create a ContentType.
ContentType.parse(String source)
Create a ContentType from String.
factory

Properties

charset String?
The character encoding standard.
final
hashCode int
The hash code for this object.
no setterinherited
mediaType MimeType
The MIME type of the resource or the data.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

html ContentType
text/html; charset=utf-8
no setter
json ContentType
application/json; charset=utf-8
no setter
text ContentType
text/plain; charset=utf-8
no setter
urlencoded ContentType
application/x-www-form-urlencoded; charset=utf-8
no setter