def stream.origin.choice

bend-kit-http@0.38.5.0 · http.bend:5043

import bend-kit-http@0.38.5.0/http.bend as Http
import Base
import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes

5043def stream.origin.choice(p: Pool, +method: String, +ms: U32,
5044    headers: Map<&2, List<&2, String>>, body: Bytes.Bytes, hf: String,
5045    scheme: String, host: String, port: U32, target: String,
5046    cert: Maybe<&2, Cert>, +ca: String, choice: Maybe<&2, Proxy>) ->
5047    IO(Pool & Result<&1, &1, Err, Stream>):
5048  match choice:
5049    case None{}:
5050      IO.pure(Pool & Result<&1, &1, Err, Stream>, (p, Fail{ErrUrl{}}))
5051    case Some{proxy}:
5052      stream.route(p, ms, origin.route(method, headers, body, hf, scheme, host,
5053        port, target, cert, ca, proxy))

Uses (18)

Used by (1)