日期:2014-05-19  浏览次数:20709 次

求助!httpclient2.0的替代方法
本人初次接触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方法,如何实现?

------解决方案--------------------
重写classLoader