相关疑难解决方法(0)

HttpClient警告:Cookie被拒绝:非法域属性

我正在使用HttpClient最新版本(4.x).而现在我正在尝试做一个GET请求.我刚刚发布了一个Get请求.

这是我的代码;

public class Poster {

    static boolean routing1 = true, routing2 = true;
    static int counter1 = 0, counter2 = 0;
    DefaultHttpClient oHtp = null;
    HttpGet oHGet = null;
    HttpResponse oHRes = null;


    private void test(String fullAddress) throws Exception {
        oHtp = new DefaultHttpClient();
        oHGet = new HttpGet(fullAddress);

        HttpResponse response = oHtp.execute(oHGet);
        System.out.print(response.getStatusLine());

        HttpEntity entity = response.getEntity();
        if (entity != null) {
            entity = new BufferedHttpEntity(entity);
            //  System.out.println(EntityUtils.toString(entity));
            System.out.print("\t entity is retrieved... ");
        }


        oHtp.getConnectionManager().shutdown();
    }
}
Run Code Online (Sandbox Code Playgroud)

我只是很好地执行它.首先是

new …
Run Code Online (Sandbox Code Playgroud)

java cookies warnings httpclient

22
推荐指数
3
解决办法
5万
查看次数

标签 统计

cookies ×1

httpclient ×1

java ×1

warnings ×1