contentType property
MediaType?
get
contentType
The full content-type, parameters included, or null when absent or
unparseable.
Implementation
MediaType? get contentType {
final raw = headers['content-type'];
if (raw == null) return null;
try {
return MediaType.parse(raw);
} on FormatException {
return null;
}
}