ContentType constructor

ContentType(String primaryType, { String subType, { String charset, Map<String, String> parameters: const {} })

Creates a new content type object setting the primary type and sub type. The charset and additional parameters can also be set using charset and parameters. If charset is passed and parameters contains charset as well the passed charset will override the value in parameters. Keys passed in parameters will be converted to lower case. The charset entry, whether passed as charset or in parameters, will have its value converted to lower-case.

Implementation

factory ContentType(String primaryType, String subType,
    {String charset, Map<String, String> parameters = const {}}) {
  return new _ContentType(primaryType, subType, charset, parameters);
}