def stream.origin.choice
bend-kit-http@0.38.2.0 · http.bend:5039
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
5039def stream.origin.choice(p: Pool, +method: String, +ms: U32,
5040 headers: Map<&2, List<&2, String>>, body: Bytes.Bytes, hf: String,
5041 scheme: String, host: String, port: U32, target: String,
5042 cert: Maybe<&2, Cert>, +ca: String, choice: Maybe<&2, Proxy>) ->
5043 IO(Pool & Result<&1, &1, Err, Stream>):
5044 match choice:
5045 case None{}:
5046 IO.pure(Pool & Result<&1, &1, Err, Stream>, (p, Fail{ErrUrl{}}))
5047 case Some{proxy}:
5048 stream.route(p, ms, origin.route(method, headers, body, hf, scheme, host,
5049 port, target, cert, ca, proxy))