Structures
The following structures are available globally.
-
The version of HTTP protocol.
HTTP uses a
See moremajor.minor
numbering scheme to indicate versions of the protocol.Declaration
Swift
public struct HTTPVersion
-
The struct containing the HTTP headers and implements the headers APIs for the
See moreRouterRequest
andRouterResponse
classes.Declaration
Swift
public struct Headers
-
A struct that allows you to configure your SSL using a CA certificate file (Linux), a CA certificate directory (Linux) or a certificate chain file (MacOS).
See moreDeclaration
Swift
public struct SSLConfig
-
The media type (formerly known as MIME type) is a standardized way to indicate the nature and format of a document. This struct consists of a catagorical
topLevelType
and specificsubtype
seperated by a/
(e.g.text/plain
). In HTTP, The media type is sent as the first section of theContent-Type
header and is case insensitive.Usage Example:
See morelet mediaType = MediaType(type: .application, subtype: "json") print(mediaType.description) // Prints ("application/json")
Declaration
Swift
public struct MediaType : CustomStringConvertible