Http.origin.route: def of bend-kit-http@0.38.2.0 Import: import bend-kit-http@0.38.2.0/http.bend as Http Lines 3813-3831 of bend-kit-http@0.38.2.0/http.bend: https://jend.leeeet.dev/read.txt?path=bend-kit-http@0.38.2.0/http.bend&start_line=3813&end_line=3831 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 # The pool key, the request as sent, and the route to one origin, direct or through a proxy. def origin.route(+method: String, headers: Map<&2, List<&2, String>>, body: Bytes.Bytes, +hf: String, +scheme: String, +host: String, +port: U32, +target: String, +cert: Maybe<&2, Cert>, +ca: String, proxy: Proxy) -> String & Send & Route: match proxy: case ProxyDirect{}: (pool.key.trust(pool.key(scheme, host, port), cert, ca), Send{method, target, hf, headers, body}, RouteDirect{String.eq(scheme, "https"), host, port, cert, ca}) case ProxyVia{+proxy_host, +proxy_port, +authorization}: +secure = String.eq(scheme, "https") (pool.key.trust(pool.key(scheme, host, port) ++ "|proxy:" ++ proxy_host ++ ":" ++ U32.show(proxy_port) ++ "|auth:" ++ authorization, cert, ca), proxy.request(secure, scheme, method, target, hf, headers, body, authorization), RouteProxy{secure, proxy_host, proxy_port, host, Url.host_field.wrap(host, Url.has(host, 58)) ++ ":" ++ U32.show(port), authorization, cert, ca}) Uses (20): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Map https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.append https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.eq https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.show https://jend.leeeet.dev/definition.txt?path=bend-kit-bytes@0.3.3.0/bytes.bend&name=Bytes https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=Cert https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=Proxy https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=Route https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=Send https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=pool.key https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=pool.key.trust https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=proxy.request https://jend.leeeet.dev/definition.txt?path=bend-kit-url@0.4.1.0/url.bend&name=has https://jend.leeeet.dev/definition.txt?path=bend-kit-url@0.4.1.0/url.bend&name=host_field.wrap