def chunks.next.of
import emerging-ezhttp@0.21.0.0/src/http.bend as Httpimport 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")}