ContentTypeHeader.from constructor

ContentTypeHeader.from(
  1. MediaType mediaType, {
  2. String? charset,
  3. String? boundary,
  4. bool? isFlowedFormat,
})

Creates a content type header from the given mediaType.

Optionally specify the used charset, boundary and isFlowedFormat values.

Implementation

ContentTypeHeader.from(
  this.mediaType, {
  String? charset,
  this.boundary,
  this.isFlowedFormat,
}) : super(mediaType.text) {
  this.charset = charset?.toLowerCase();
}