java HttpClient设置代理

HttpClient client = new HttpClient();

 

UsernamePasswordCredentials creds = new UsernamePasswordCredentials(userData.id, userData.password); client.getState().setProxyCredentials(AuthScope.ANY, creds);

 

posted @ 2014-11-12 17:59  daijinming  阅读(634)  评论(0编辑  收藏  举报