def wire.exchange
emerging-ezhttp@0.21.0.0 · src/wirespec.bend:97
import emerging-ezhttp@0.21.0.0/src/wirespec.bend as Wirespec
import Base
import emerging-ezhttp@0.21.0.0/src/http.bend as Http
import emerging-ezhttp@0.21.0.0/src/url.bend as Url
97
98def wire.exchange(method: String, l: Url.Loc, headers: List<&2, Http.Header>,
99 body: String) -> Exchange:
100 match l:
101 case Url.Bad{why}:
102 NoUrl{why}
103 case Url.Loc{scheme, host, port, path}:
104 +secure = String.eq(scheme, "https")
105 wire.exchange.at(method, secure, host, port, path, headers, body)