gpt4 book ai didi

android - 如何为 Http Get 请求设置 cookie?

转载 作者:塔克拉玛干 更新时间:2023-11-02 23:31:36 31 4
gpt4 key购买 nike

<分区>

真的想不通 - 如何将 cookie 添加到 HTTP GET 请求?

List<Cookie> cookies = httpcPostlient.getCookieStore().getCookies();

Log.e("cookie_0", cookies.get(0).toString());

try {

HttpClient client = new DefaultHttpClient();
HttpGet request = new HttpGet();

// request <- how do I set cookies.get(0) into here?

request.setURI(new URI(myUrl));

HttpResponse httpGetResponse = client.execute(request);
}

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com