MIMEType

external class MIMEType(source)

An implementation of the MIMEType class.

In accordance with browser conventions, all properties of MIMEType objects are implemented as getters and setters on the class prototype, rather than as data properties on the object itself.

A MIME string is a structured string containing multiple meaningful components. When parsed, a MIMEType object is returned containing properties for each of these components.

Since

v19.1.0, v18.13.0

Constructors

Link copied to clipboard
constructor(input: String)

Creates a new MIMEType object by parsing the input.

constructor(input: MIMETypeInput)

Creates a new MIMEType object by parsing the input.

Properties

Link copied to clipboard

Gets the essence of the MIME. This property is read only. Use mime.type or mime.subtype to alter the MIME.

Link copied to clipboard

Gets the MIMEParams object representing the parameters of the MIME. This property is read-only. See MIMEParams documentation for details.

Link copied to clipboard

Gets and sets the subtype portion of the MIME.

Link copied to clipboard

Gets and sets the type portion of the MIME.

Functions

Link copied to clipboard
open override fun toString(): String

The toString() method on the MIMEType object returns the serialized MIME.