contentType property
MediaType
contentType
The parsed Content-Type
header of the HttpMultipartFormData
.
Returns null
if not present.
Implementation
//MediaType get contentType => _contentType ??= (formData.contentType == null
// ? null
// : MediaType.parse(formData.contentType.toString()));
MediaType get contentType {
if (formData.contentType != null) {
try {
_contentType = MediaType.parse(formData.contentType.toString());
} catch (e) {
log.warning(
'Invalue media type [${formData.contentType.toString()}]', e);
}
}
return _contentType;
}