value property

String value

Returns the corresponding MIME type string for the content type.

If the content type is not one of the above, it defaults to 'application/json'.

Implementation

String get value {
  switch (this) {
    case ContentType.json:
      return 'application/json';
    case ContentType.stream:
      return 'application/octet-stream';
    case ContentType.bytes:
      return 'application/octet-stream';
    case ContentType.text:
      return 'text/plain';
    default:
      return 'application/json';
  }
}