def h2.response.parsed

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

import bend-kit-http@0.38.2.0/http.bend as Http
import Base
import bend-kit-http2@0.4.0.0/hpack.bend as Hpack
import bend-kit-bytes@0.3.3.0/bytes.bend as HBytes

3239def h2.response.parsed(m: Maybe<&2, U32>, headers: List<&2, Hpack.Field>,
3240    body: HBytes.Bytes) -> Result<&1, &1, Err, Maybe<&1, Res>>:
3241  match m:
3242    case None{}:
3243      Fail{ErrBad{}}
3244    case Some{+status}:
3245      h2.response.valid(Bool.and(U32.is_ge(status, 100), U32.is_lt(status, 600)),
3246        status, headers, body)

Uses (12)

Used by (1)