Package org.jsoup.helper
Class CookieUtil
java.lang.Object
org.jsoup.helper.CookieUtil
Helper functions to support the Cookie Manager / Cookie Storage in HttpConnection.
- Since:
- 1.14.1
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static voidapplyCookiesToRequest(HttpConnection.Request req, BiConsumer<String, String> setter) Pre-request, get any applicable headers out of the Request cookies and the Cookie Store, and add them to the request headers.(package private) static URI(package private) static voidparseCookie(String value, HttpConnection.Response res) private static LinkedHashSet<String> (package private) static voidstoreCookies(HttpConnection.Request req, HttpConnection.Response res, URL url, Map<String, List<String>> resHeaders) Store the Result cookies into the cookie manager, and place relevant cookies into the Response object.
-
Field Details
-
EmptyRequestHeaders
-
Sep
- See Also:
-
CookieName
- See Also:
-
Cookie2Name
- See Also:
-
-
Constructor Details
-
CookieUtil
CookieUtil()
-
-
Method Details
-
applyCookiesToRequest
static void applyCookiesToRequest(HttpConnection.Request req, BiConsumer<String, String> setter) throws IOExceptionPre-request, get any applicable headers out of the Request cookies and the Cookie Store, and add them to the request headers. If the Cookie Store duplicates any Request cookies (same name and value), they will be discarded.- Throws:
IOException
-
requestCookieSet
-
asUri
- Throws:
IOException
-
storeCookies
static void storeCookies(HttpConnection.Request req, HttpConnection.Response res, URL url, Map<String, List<String>> resHeaders) throws IOExceptionStore the Result cookies into the cookie manager, and place relevant cookies into the Response object.- Throws:
IOException
-
parseCookie
-