java HttpClient设置代理

HttpClient client = new HttpClient();

 

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

 

你可能感兴趣的:(httpclient)