Code below will work provided it can connect to given urlString even through browser.
URL url = new URL(urlString);
URLConnection conn = url.openConnection();
OutputStreamWriter wr = new OutputStreamWriter(conn.getOutputStream());
wr.write(data);
wr.flush();
All most all offices / companies have proxy servers and they want to route the trafic through these proxy servers. My question is How such situations should be handled?
Couple of thoughts -
1) We can set proxy details as a part of JVM
2) We can retrive it from browser at runtime.
Is there any better / recommended way?
Also on production region, what will be the browser proxy settings? Will it be disabled?