一个很正常的网站,使用httpclient提交怎么都会有问题

     HttpPost httppost = new HttpPost();
        // HttpGet httppost = new HttpGet();
        URI uri = new URI(post);
        httppost.setURI(uri);
        HttpClient httpclient = new DefaultHttpClient();
        String html = "";
        HttpResponse response = httpclient.execute(httppost);
        System.out.println(response.getStatusLine());

总是报那个错误org.apache.http.NoHttpResponseException:

                        The target server failed to respond

本来打算读读源码看看到底什么问题,突然想把post换成get方式再试试,结果完全无问题了。。。。哪位有兴趣读了源码可以告诉我下原因

posted on 2012-11-30 14:52  程序猿_哲  阅读(17708)  评论(0编辑  收藏  举报