When I create a DefaultHttpClient object and try to hit a webpage, the request isn\'t routed through the proxy I specified in Settings.
Looking through the API docs,
Try :
System.setProperty("http.proxyHost", );
System.setProperty("http.proxyPort", );
or
DefaultHttpClient httpclient = new DefaultHttpClient();
HttpHost httpproxy = new HttpHost("",);
httpclient.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY, httpproxy);
or
HttpHost proxy = new HttpHost("ip address",port number);
DefaultHttpClient httpclient = new DefaultHttpClient();
httpclient.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY,proxy);
HttpPost httpost = new HttpPost(url);
List nvps = new ArrayList();
nvps.add(new BasicNameValuePair("param name", param));
httpost.setEntity(new UrlEncodedFormEntity(nvps, HTTP.ISO_8859_1));
HttpResponse response = httpclient.execute(httpost);
HttpEntity entity = response.getEntity();
System.out.println("Request Handled?: " + response.getStatusLine());
InputStream in = entity.getContent();
httpclient.getConnectionManager().shutdown();