Sto provando a POST alcuni parametri su un server, ma ho bisogno di impostare il proxy. puoi aiutarmi a ordinare la parte "settaggio proxy" del mio codice?Apache HttpClient 4.1 - Impostazioni proxy
HttpHost proxy = new HttpHost("xx.x.x.xx");
DefaultHttpClient httpclient = new DefaultHttpClient();
httpclient.getParams().setParameter("3128",proxy);
HttpPost httpost = new HttpPost(url);
List<NameValuePair> nvps = new ArrayList<NameValuePair>();
nvps.add(new BasicNameValuePair("aranan", song));
httpost.setEntity(new UrlEncodedFormEntity(nvps, HTTP.UTF_8));
HttpResponse response = httpclient.execute(httpost);
HttpEntity entity = response.getEntity();
System.out.println("Request Handled?: " + response.getStatusLine());
in = entity.getContent();
httpclient.getConnectionManager().shutdown();
'httpclient.getParams() setParameter (ConnRoutePNames.DEFAULT_PROXY, proxy);' è deprecato – Mazhar