contentType property
Gets or sets the content type to send back to a client.
Implementation
MediaType get contentType {
try {
return MediaType.parse(headers['content-type']);
} catch (_) {
return MediaType('text', 'plain');
}
}
Gets or sets the content type to send back to a client.
Implementation
set contentType(MediaType value) {
headers['content-type'] = value.toString();
}