mirror of
https://gitee.com/dromara/hutool.git
synced 2025-06-28 13:34:09 +08:00
add test
This commit is contained in:
parent
ab35ba10a2
commit
64e983db0f
@ -74,7 +74,6 @@ public class GlobalCookieManager {
|
||||
throw new IORuntimeException(e);
|
||||
}
|
||||
|
||||
|
||||
// 不覆盖模式回填Cookie头,这样用户定义的Cookie将优先
|
||||
conn.header(cookieHeader, false);
|
||||
}
|
||||
|
22
hutool-http/src/test/java/cn/hutool/http/Issue2658Test.java
Executable file
22
hutool-http/src/test/java/cn/hutool/http/Issue2658Test.java
Executable file
@ -0,0 +1,22 @@
|
||||
package cn.hutool.http;
|
||||
|
||||
import cn.hutool.core.lang.Console;
|
||||
import cn.hutool.http.cookie.GlobalCookieManager;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.net.HttpCookie;
|
||||
import java.util.List;
|
||||
|
||||
public class Issue2658Test {
|
||||
|
||||
@SuppressWarnings("resource")
|
||||
@Test
|
||||
@Ignore
|
||||
public void getWithCookieTest(){
|
||||
HttpRequest.get("https://www.baidu.com/").execute();
|
||||
final List<HttpCookie> cookies = GlobalCookieManager.getCookieManager().getCookieStore().getCookies();
|
||||
Console.log("###" + cookies);
|
||||
HttpRequest.get("https://www.baidu.com/").execute();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user