def Http.framing.pick

bend-kube-runtime@0.2.0.0 · src/http.bend:224

import bend-kube-runtime@0.2.0.0/src/http.bend as Http
import Base

224def Http.framing.pick(none: Bool, te: Maybe<&2, String>, cl: Maybe<&2, String>) -> Phase:
225  match none te cl:
226    case True{} _ _:
227      PDone{}
228    case False{} Some{t} _:
229      Http.framing.te(String.contains(Http.lower(t), "chunked"))
230    case False{} None{} Some{n}:
231      Http.framing.len(U32.read(n))
232    case False{} None{} None{}:
233      PClose{}

Uses (9)

Used by (1)