Open
Description
Problem Description
I would be nice if the http client supported http proxies. Adding proxy support is relatively straightforward as its done using headers.
Regular HTTP request (connection to target 1.1.1.1)
GET / HTTP/1.1
Host: 1.1.1.1:8080
User-Agent: curl/7.68.0
Request to a proxy (connection to proxy 2.2.2.2)
GET http://1.1.1.1:8000/ HTTP/1.1
Host: 1.1.1.1:8000
User-Agent: curl/7.68.0
The primary difference is that the tcp connection doesn't match the host header and the full uri is used in the request line. Authorization could be manually performed using the current addHeader()
method to add the Proxy-Authorization
header.
I have working changes locally that I'd be happy to contribute if the maintainers think this is a worthwhile feature.