def plan.body

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

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

898# a body under its framing, as the text parse reads it
899def plan.body(status: U32, headers: List<&2, Header>, f: Frame, +body: String)
900  -> Reply:
901  match f:
902    case Bare{}:
903      Reply{status, headers, ""}
904    case Sized{n}:
905      parse.clen(status, headers, n, body)
906    case Chunked{}:
907      parse.chunks(status, headers, body)
908    case Closed{}:
909      Reply{status, headers, body}

Uses (8)

Used by (1)