public class GlobalCookieManager extends Object
Constructor and Description |
---|
GlobalCookieManager() |
Modifier and Type | Method and Description |
---|---|
static void |
add(HttpConnection conn)
将本地存储的Cookie信息附带到Http请求中,不覆盖用户定义好的Cookie
|
static CookieManager |
getCookieManager()
获取全局
CookieManager |
static List<HttpCookie> |
getCookies(HttpConnection conn)
获取指定域名下所有Cookie信息
|
static void |
setCookieManager(CookieManager customCookieManager)
|
static void |
store(HttpConnection conn)
存储响应的Cookie信息到本地
|
public static void setCookieManager(CookieManager customCookieManager)
customCookieManager
- 自定义的CookieManager
public static CookieManager getCookieManager()
CookieManager
CookieManager
public static List<HttpCookie> getCookies(HttpConnection conn)
conn
- HTTP连接public static void add(HttpConnection conn)
conn
- HttpConnection
public static void store(HttpConnection conn)
conn
- HttpConnection
Copyright © 2024. All rights reserved.