HttpClient client = new HttpClient();
UsernamePasswordCredentials creds = new UsernamePasswordCredentials(userData.id, userData.password); client.getState().setProxyCredentials(AuthScope.ANY, creds);
原文:http://www.cnblogs.com/daijinming/p/4092947.html