zhengrenjie / zhengrenjie.github.io

my blog
0 stars 0 forks source link

HttpClient 带Cookie请求的一个Bug | zhengrenjie's Blog #8

Open zhengrenjie opened 5 years ago

zhengrenjie commented 5 years ago

https://www.jelliclecat.cn/articles/Java/HttpClientBug.html

一、情景复现最近在使用HttpClient做rpc的时候,需要带上Cookie做认证,是一个很简单的功能,官网上有标准做法: 12345678910111213141516171819202122232425public static String Get(String url, String ticket) throws IOException { CookieStore co