本人初次接触httpclient,项目中用的是httpclient3.0jar包,和其它包有冲突,要把其中一个方法改为httpclient2.0的实现方法,请高手告知,谢谢。
代码:
HttpState inits = new HttpState();
inits.setCredentials(new AuthScope("localhost",8082,null), new UsernamePasswordCredentials("admin","admin"));
// AuthScope 是httpclient3.0的类,inits.setCredentials()转换成httpclient2.0方法,如何实现?
代码:
HttpState inits = new HttpState();
inits.setCredentials(new AuthScope("localhost",8082,null), new UsernamePasswordCredentials("admin","admin"));
// AuthScope 是httpclient3.0的类,inits.setCredentials()转换成httpclient2.0方法,如何实现?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货