1

Is it right that HTTPProxyHandler always sends a CONNECT request? Isn't this only applicable when you want to do tunneling?

1 Answer 1

0

HTTPProxyHandler does not know if you only want to tunnel http data, or want to make http request at the moment of connection, therefore, it guesses the option that works in both cases, since a standard complements HTTP proxy supports both the CONNECT and the old http proxy method call. If you need to implement a HTTP proxy using GET and other methods, just thread the connection as a normal HTTP connection, but specify the full url including the http:// part in the url.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.