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 more

    Declaration

    Swift

    public struct HTTPHeader
    extension HTTPHeader: Hashable
  • Defines storage for a collection of HTTPHeaders for use in a URLRequest.

    An instance can be initialized using a dictionary literal (e.g. headers = [.contentType: HTTPMediaType.json.stringValue()]).

    See more

    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 more

    Declaration

    Swift

    public struct HTTPMediaType
    extension HTTPMediaType: Equatable
    extension HTTPMediaType: CustomStringConvertible