MIMEType
public struct MIMEType
Allows MIME types to be declared statically at compile-time, enabling them to
be referenced in a non-stringly
way.
-
A
Stringrepresentation of theMIMEType.Declaration
Swift
public let rawValue: String -
Constructs a new
MIMETypeusing the given string.Declaration
Swift
public init(_ type: StaticString)Parameters
typeStaticStringcontaining the MIME type string.
-
Represents the MIME type
`application/x-www-form-urlencoded`
.Declaration
Swift
public static let urlFormEncoded = MIMEType("application/x-www-form-urlencoded") -
Represents the MIME type
`application/json`
.Declaration
Swift
public static let json = MIMEType("application/json")
View on GitHub
MIMEType Struct Reference