I was just wondering if anyone solved this problem. Googling gives tons of posts having this question but not one with a proper reply. I tried literally every combination of the following two pieces of code with and without proxy:
/*********** URL METHOD ***************/
//URLConnection conn = aURL.openConnection();
//conn.connect();
//InputStream is = conn.getInputStream();
/*********** HTTP METHOD ***************/
HttpClient client = new DefaultHttpClient();
HttpGet get = new HttpGet(urlString);
HttpResponse resp = client.execute(get);
InputStream is = resp.getEntity().getContent();
I am trying to connect to a site on my intranet (its not localhost). I've tried the following:
- Setting Proxy inside Eclipse settings
- Setting my own localhost and writing a small php script that takes the url, connects to it and then gets the file from the intranet site - This works from the Browser though! It does not work when I use the 10.0.2.2 IP address
Any thoughts?