def head.plan

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

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

888# a final head's plan, its status line read (RFC 9112 §4, §6.3)
889def head.plan(m: Maybe<&2, U32>, +ls: List<&2, String>) -> Plan:
890  match m:
891    case None{}:
892      Unplanned{"the response has no status line"}
893    case Some{n}:
894      +lens = head.values(ls, "content-length")
895      plan.agree(n, head.list(ls), head.go(ls, "transfer-encoding"), lens,
896        clen.agree(lens))

Uses (10)

Used by (2)