HTTPListHeaderIterator

public struct HTTPListHeaderIterator : Sequence, IteratorProtocol

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

  • Declaration

    Swift

    mutating public func next() -> ByteBufferView?
  • Declaration

    Swift

    public func makeIterator() -> HTTPListHeaderIterator
  • Undocumented

    Declaration

    Swift

    @_inlineable
    public init(headerName: String,
                headers: HTTPHeaders)