def pool.origin

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

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

3852def pool.origin(p: Pool, method: String, ms: U32,
3853    headers: Map<&2, List<&2, String>>, body: Bytes.Bytes, hf: String,
3854    a: Url.Abs, known: Bool, cert: Maybe<&2, Cert>, +ca: String,
3855    choice: Maybe<&2, Proxy>) ->
3856    IO(Pool & Result<&1, &1, Err, Res>):
3857  Url.Abs{scheme, host, port, target} = a
3858  match known:
3859    case False{}:
3860      IO.pure(Pool & Result<&1, &1, Err, Res>, (p, Fail{ErrUrl{}}))
3861    case True{}:
3862      pool.origin.choice(p, method, ms, headers, body, hf, scheme, host,
3863        port, target, cert, ca, choice)

Uses (19)

Used by (1)