Documentation ¶
Overview ¶
Package mediatype provides types, constant and parsing functions for media types (MIME).
Index ¶
Constants ¶
View Source
const ( // ApplicationJSON json mime type. ApplicationJSON string = "application/json" // ApplicationXML xml mime type. ApplicationXML string = "application/xml" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MediaType ¶
type MediaType struct { MediaType string Type string Subtype *string // Parameters are optional key-value pairs that follow the type/subtype in a MIME type. Parameters map[string]string }
MediaType represents a media type (MIME).
A MIME type most commonly consists of just two parts: a type and a subtype, separated by a slash (/) — with no whitespace between:.
Click to show internal directories.
Click to hide internal directories.