Structures
The following structures are available globally.
-
Describes a HTTP header field by name.
Also contains all HTTP permanent message header field names, referenced from: https://www.iana.org/assignments/message-headers/message-headers.xhtml
See moreDeclaration
Swift
public struct HTTPHeader
extension HTTPHeader: Hashable
-
Defines storage for a collection of
HTTPHeader
s for use in aURLRequest
.An instance can be initialized using a dictionary literal (e.g.
See moreheaders = [.contentType: HTTPMediaType.json.stringValue()]
).Declaration
Swift
public struct HTTPHeaders
extension HTTPHeaders: ExpressibleByDictionaryLiteral
-
Describes media types for the
Content-Type
HTTP header.Also contains a number of default media types, defined according to: https://tools.ietf.org/html/rfc2045#section-5
See moreDeclaration
Swift
public struct HTTPMediaType
extension HTTPMediaType: Equatable
extension HTTPMediaType: CustomStringConvertible