{
  "type": "module",
  "source": "doc/api/api-contenttype.md",
  "modules": [
    {
      "textRaw": "MIME Type Parsing",
      "name": "mime_type_parsing",
      "type": "module",
      "modules": [
        {
          "textRaw": "`MIMEType` interface",
          "name": "`mimetype`_interface",
          "type": "module",
          "desc": "<ul>\n<li><strong>type</strong> <code>string</code></li>\n<li><strong>subtype</strong> <code>string</code></li>\n<li><strong>parameters</strong> <code>Map&#x3C;string, string></code></li>\n<li><strong>essence</strong> <code>string</code></li>\n</ul>",
          "displayName": "`MIMEType` interface"
        }
      ],
      "methods": [
        {
          "textRaw": "`parseMIMEType(input)`",
          "name": "parseMIMEType",
          "type": "method",
          "signatures": [
            {
              "params": [
                {
                  "name": "input"
                }
              ]
            }
          ],
          "desc": "<p>Implements <a href=\"https://mimesniff.spec.whatwg.org/#parse-a-mime-type\">parse a MIME type</a>.</p>\n<p>Parses a MIME type, returning its type, subtype, and any associated parameters. If the parser can't parse an input it returns the string literal <code>'failure'</code>.</p>\n<pre><code class=\"language-js\">import { parseMIMEType } from 'undici'\n\nparseMIMEType('text/html; charset=gbk')\n// {\n//   type: 'text',\n//   subtype: 'html',\n//   parameters: Map(1) { 'charset' => 'gbk' },\n//   essence: 'text/html'\n// }\n</code></pre>\n<p>Arguments:</p>\n<ul>\n<li><strong>input</strong> <code>string</code></li>\n</ul>\n<p>Returns: <code>MIMEType|'failure'</code></p>"
        },
        {
          "textRaw": "`serializeAMimeType(input)`",
          "name": "serializeAMimeType",
          "type": "method",
          "signatures": [
            {
              "params": [
                {
                  "name": "input"
                }
              ]
            }
          ],
          "desc": "<p>Implements <a href=\"https://mimesniff.spec.whatwg.org/#serialize-a-mime-type\">serialize a MIME type</a>.</p>\n<p>Serializes a MIMEType object.</p>\n<pre><code class=\"language-js\">import { serializeAMimeType } from 'undici'\n\nserializeAMimeType({\n  type: 'text',\n  subtype: 'html',\n  parameters: new Map([['charset', 'gbk']]),\n  essence: 'text/html'\n})\n// text/html;charset=gbk\n\n</code></pre>\n<p>Arguments:</p>\n<ul>\n<li><strong>mimeType</strong> <code>MIMEType</code></li>\n</ul>\n<p>Returns: <code>string</code></p>"
        }
      ],
      "displayName": "MIME Type Parsing"
    }
  ]
}