Structures

The following structures are available globally.

  • An IteratorProtocol that can iterate through comma separated list of values for a certain header.

    Example:

    Suppose you have these headers:

     Connection: keep-alive, x-server
     Content-Type: text/html
     Connection: other
    

    You can iterate using this struct on those headers, for values of Connection, to get keep-alive, then x-server, then other

    See more

    Declaration

    Swift

    public struct HTTPListHeaderIterator : Sequence, IteratorProtocol
  • 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
  • The Index for a header name or value that points into the underlying ByteBuffer.

    Note

    This is public to aid in the creation of supplemental HTTP libraries, e.g. NIOHTTP2 and NIOHPACK. It is not intended for general use.
    See more

    Declaration

    Swift

    public struct HTTPHeaderIndex
  • Struct which holds name, value pairs.

    Note

    This is public to aid in the creation of supplemental HTTP libraries, e.g. NIOHTTP2 and NIOHPACK. It is not intended for general use.
    See more

    Declaration

    Swift

    public struct HTTPHeader
  • 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
  • A structure representing a HTTP version.

    See more

    Declaration

    Swift

    public struct HTTPVersion : Equatable