Skip to content

Http1BodyFraming

Http1BodyFraming = { kind: "none"; } | { kind: "length"; length: number; } | { kind: "chunked"; } | { kind: "until-close"; } | { kind: "tunnel"; }

Defined in: packages/format-http/src/h1/http1-message.ts:19

How the body of a decoded message is delimited (RFC 9112 §6).

  • none — no body.
  • length — exactly length bytes, streamed as the value’s body.
  • chunked — a sequence of Http1Chunk values, each streaming its own bytes, ended by an Http1Trailers value.
  • until-close — the rest of the connection, streamed as the value’s body. Responses only.
  • tunnel — the connection stops being HTTP after this head: a 101 or a 2xx to CONNECT. Responses only; the codec decodes nothing more.