def stream.origin
bend-kit-http@0.38.5.0 · http.bend:5055
import bend-kit-http@0.38.5.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
5055
5056def stream.origin(p: Pool, +method: String, +ms: U32, headers: Map<&2, List<&2, String>>,
5057 body: Bytes.Bytes, hf: String, a: Url.Abs, known: Bool,
5058 cert: Maybe<&2, Cert>, +ca: String, choice: Maybe<&2, Proxy>) ->
5059 IO(Pool & Result<&1, &1, Err, Stream>):
5060 Url.Abs{scheme, host, port, target} = a
5061 match known:
5062 case False{}:
5063 IO.pure(Pool & Result<&1, &1, Err, Stream>, (p, Fail{ErrUrl{}}))
5064 case True{}:
5065 stream.origin.choice(p, method, ms, headers, body, hf, scheme, host, port,
5066 target, cert, ca, choice)