HTTPPart

The parts of a complete HTTP message, representing either a request or a response.

HTTPTypes.swift:137
enum HTTPPart<HeadT, BodyT> where HeadT : Equatable, BodyT : Equatable

An HTTP message is made up of:

  • a request or status line with several headers, encoded by a single head(_:) part,

  • zero or more body(_:) parts,

  • and some optional trailers (represented as headers) in a single end(_:) part.

To indicate that a complete HTTP message has been sent or received, an end(_:) part must be used, even when no trailers are included.