Object - mime : MediaType

Describes the nature of the data in the body of a MIME entity.

Methods

Fields

  • primaryType string
  • Declares the general type of data

  • subType string
  • A specific format of the primary type data

  • suffix string
  • Identify the semantics of a specific media type

  • parameters map {}
  • A set of parameters, specified in an attribute=value notation

getBaseType

()

returns string

Gets “primaryType/subtype+suffix” combination in string format.

  • Return Type

    (string)
  • Base type as a string from MediaType struct

toString

()

returns string

Converts the media type to a string, suitable to be used as the value of a corresponding HTTP header.

  • Return Type

    (string)
  • Content type with parameters as a string