mediaType property
MediaType?
get
mediaType
Helper to get generic MediaType.
Implementation
MediaType? get mediaType {
final contentType = header('content-type');
if (contentType == null) return null;
try {
return MediaType.parse(contentType);
} catch (_) {
return null;
}
}