def parse.finish

bend-kit-http@0.38.2.0 · http.bend:806

import bend-kit-http@0.38.2.0/http.bend as Http
import Base
import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes

806def parse.finish(method: String, path: String, h: Map<&2, List<&2, String>>, body: Hold) -> Got:
807  match body:
808    case HoldBad{}:
809      GotBad{}
810    case HoldMore{}:
811      GotHead{Req{method, path, h, Bytes.new(0)}}
812    case HoldUntil{b}:
813      GotBad{}
814    case HoldBody{b}:
815      GotReq{Req{method, path, h, Bytes.from_string(b)}}

Uses (8)

Used by (1)