W3cubDocs

/Dart 2

parse method

ContentType parse (String value)
override

Creates a new content type object from parsing a Content-Type header value. As primary type, sub type and parameter names and values are not case sensitive all these values will be converted to lower case. Parsing this string

text/html; charset=utf-8

will create a content type object with primary type text, sub type html and parameter charset with value utf-8.

Implementation

static ContentType parse(String value) {
  return _ContentType.parse(value);
}

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dart.dev/stable/2.5.0/dart-io/ContentType/parse.html