8
回答
httpClient访问oschina
注册华为云得mate10,2.9折抢先购!>>>   

      老大,我用commons-httpClient访问了咱的网站,它不让我访问,直接给我输出403状态。源码如下:

 

HttpClient hc = new HttpClient();
HttpMethod hm = new GetMethod("http://www.oschina.net/");
System.out.println(hc.executeMethod(hm));

    老大帮忙看看啥问题?

举报
顶部