Closed
Description
Most requests are written like this:
GET /foo/bar HTTP/1.1
Host: example.domain
But if using a proxy, it needs to be written like this:
GET http://example.domain/foo/bar HTTP/1.1
Host: example.domain
There currently isn't really a way to figure this out, and no way to tell the Client
or Request
that it needs to be done. Some options include:
- Similar to how golang does it, provide a method on
Request
, likerequest.set_proxy_url(url)
. The downside is that the knowledge that a proxy is being used is inside theConnect
part of theClient
, and so knowing to use this requires knowing that theConnect
is using a proxy. - Somehow expose this intent on the
Connect
trait. Downside is that it means thatConnect
cannot be simply beService<Request=Url, Response=Io>
. Maybe that's not too bad.
Without this issue solved, it's impossible to talk to HTTP/1 proxies.