function parseContentType(rawContentType) {
  const [type, ...rawParams] = rawContentType.split(';').map((s) => s.trim());
  const paramsItems = rawParams.map((param) => param.split('='));
  return { type, params: itemsToObject(paramsItems) };
}
Parse a 'Content-Type' header value to the content-type and parameters
@param {String} rawContentType the raw string to parse from
@returns {Object} the parsed content type with the fields: type and params