Michal
Michal

Reputation: 173

java.net.Proxy using HTTPS scheme

java.net.Proxy.Type is limited to DIRECT, HTTP, SOCKS only.
How to connect with a host using HTTPS proxy?

Curl equivalent example:
curl --proxy https://PROXY_HOST:2272 -Iv http://example.com

Upvotes: 2

Views: 662

Answers (1)

Michal
Michal

Reputation: 173

java.net.Proxy does not support HTTPS proxy.
Solution is to use other client, e.g. apache.http.client.HttpClient.

Upvotes: 2

Related Questions