def packed.chunked

emerging-ezhttp@0.21.0.0 · src/packed.bend:118

import emerging-ezhttp@0.21.0.0/src/packed.bend as Packed
import Base
import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes
import emerging-ezhttp@0.21.0.0/src/http.bend as Http

118# a chunked body's octets in order, or why it was torn
119def packed.chunked(st: U32, hs: List<&2, Http.Header>, reason: String,
120  r: Parts) -> Got:
121  match r:
122    case Bad{why}:
123      Torn{why}
124    case Parts{ps}:
125      Got{st, hs, reason, Bytes.concat(List.reverse(&1, Bytes.Bytes, ps))}

Uses (9)

Used by (1)