def up.origin.choice

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

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

5426def up.origin.choice(+method: String, +ms: U32,
5427    headers: Map<&2, List<&2, String>>, hf: String,
5428    scheme: String, host: String, port: U32, target: String,
5429    cert: Maybe<&2, Cert>, +ca: String, choice: Maybe<&2, Proxy>) ->
5430    IO(Result<&1, &1, Err, Up>):
5431  match choice:
5432    case None{}:
5433      IO.pure(Result<&1, &1, Err, Up>, Fail{ErrUrl{}})
5434    case Some{proxy}:
5435      up.route(ms, origin.route(method, headers, Bytes.new(0), hf, scheme, host,
5436        port, target, cert, ca, proxy))

Uses (15)

Used by (1)