-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Determine how to specify that Client should write URI for a Proxy #1056
Copy link
Copy link
Closed
Labels
A-clientArea: client.Area: client.
Milestone
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 theConnectpart of theClient, and so knowing to use this requires knowing that theConnectis using a proxy. - Somehow expose this intent on the
Connecttrait. Downside is that it means thatConnectcannot 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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-clientArea: client.Area: client.