0

I am using below code

    URL obj = new URL("https://www.example.com/profile");
    Proxy proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress(Ip, port));
    HttpsURLConnection con = (HttpsURLConnection) obj.openConnection(proxy);    

    BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));

But I am not able to get data from web page. Please suggest how can I use the Proxy to fetch data from Https urls.

Thanks in advance.

Shiladittya Chakraborty
  • 4,270
  • 8
  • 45
  • 94
vksh
  • 143
  • 2
  • 2
  • 8
  • not error but I am not getting any output ,String inputLine; while ((inputLine = in.readLine()) != null) { response.append(inputLine); } in.close(); } Response is empty, also tried to read con.getErrorStream(), response is empty – vksh Jan 07 '16 at 06:52
  • this may useful to you http://stackoverflow.com/questions/120797/how-do-i-set-the-proxy-to-be-used-by-the-jvm – sampathpremarathna Jan 07 '16 at 07:34

0 Answers0