When I run a local proxy (port 7000), and use curl, the command looks like this:
curl "http://httpbin.org/status/200" -x localhost:7000
What happens, and this is the expected behavior, is that curl establishes a TCP connection to localhost:7000, and runs the HTTP request against the local proxy, rather than the target (httpbin).
If I use the following code:
then the http client would first execute a CONNECT command (method) against the local proxy, and then would execute the original HTTP request (GET) inside the TCP level channel/tunnel it created from the executed CONNECT method.
I would expect that the default behavior when using a HTTP proxy would be the same as the one provided by curl, demonstrated above.
Spring Boot Version: