def chunks.next.of

emerging-ezhttp@0.21.0.0 · src/http.bend:258

import emerging-ezhttp@0.21.0.0/src/http.bend as Http
import Base

258# one chunk header: reject non-hex sizes, stop on the 0 chunk, else continue
259def chunks.next.of(zero: Bool, ready: Bool, +after: String, +n: Nat) -> Next:
260  match zero ready:
261    case True{} _:
262      Stop{}
263    case False{} False{}:
264      Reject{"the chunked body stopped short"}
265    case False{} True{}:
266      Go{divide(octs.drop(after, Nat.add(n, 2n)), "\r\n")}

Uses (7)

Used by (1)