Structures

The following structures are available globally.

  • A representation of the request line and header fields of a HTTP request.

    See more

    Declaration

    Swift

    public struct HTTPRequestHead : Equatable
  • A representation of the status line and header fields of a HTTP response.

    See more

    Declaration

    Swift

    public struct HTTPResponseHead : Equatable
  • A representation of a block of HTTP header fields.

    HTTP header fields are a complex data structure. The most natural representation for these is a sequence of two-tuples of field name and field value, both as strings. This structure preserves that representation, but provides a number of convenience features in addition to it.

    For example, this structure enables access to header fields based on the case-insensitive form of the field name, but preserves the original case of the field when needed. It also supports recomposing headers to a maximally joined or split representation, such that header fields that are able to be repeated can be represented appropriately.

    See more

    Declaration

    Swift

    public struct HTTPHeaders : CustomStringConvertible, ExpressibleByDictionaryLiteral
  • A structure representing a HTTP version.

    See more

    Declaration

    Swift

    public struct HTTPVersion : Equatable