Skip to content

Determine how to specify that Client should write URI for a Proxy #1056

Closed
@seanmonstar

Description

@seanmonstar

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, like request.set_proxy_url(url). The downside is that the knowledge that a proxy is being used is inside the Connect part of the Client, and so knowing to use this requires knowing that the Connect is using a proxy.
  • Somehow expose this intent on the Connect trait. Downside is that it means that Connect cannot be simply be Service<Request=Url, Response=Io>. Maybe that's not too bad.

Without this issue solved, it's impossible to talk to HTTP/1 proxies.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions