contentType method

Method contentType(
  1. String mimeType,
  2. String charset
)

Implementation

Method contentType(String mimeType, String charset) {
  final mt = MediaType.parse(getHeaders['content-type'] ?? 'text/plain');
  header(
      'content-type',
      mt.change(
          mimeType: mimeType, parameters: {'charset': charset}).toString());
  return this;
}