Package org.jsoup.helper
Class CookieUtil
- java.lang.Object
-
- org.jsoup.helper.CookieUtil
-
class CookieUtil extends java.lang.ObjectHelper functions to support the Cookie Manager / Cookie Storage in HttpConnection.- Since:
- 1.14.1
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.StringCookie2Nameprivate static java.lang.StringCookieNameprivate static java.util.Map<java.lang.String,java.util.List<java.lang.String>>EmptyRequestHeadersprivate static java.lang.StringSep
-
Constructor Summary
Constructors Constructor Description CookieUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description (package private) static voidapplyCookiesToRequest(HttpConnection.Request req, java.net.HttpURLConnection con)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 java.net.URIasUri(java.net.URL url)private static java.util.LinkedHashSet<java.lang.String>requestCookieSet(Connection.Request req)(package private) static voidstoreCookies(HttpConnection.Request req, java.net.URL url, java.util.Map<java.lang.String,java.util.List<java.lang.String>> resHeaders)
-
-
-
Field Detail
-
EmptyRequestHeaders
private static final java.util.Map<java.lang.String,java.util.List<java.lang.String>> EmptyRequestHeaders
-
Sep
private static final java.lang.String Sep
- See Also:
- Constant Field Values
-
CookieName
private static final java.lang.String CookieName
- See Also:
- Constant Field Values
-
Cookie2Name
private static final java.lang.String Cookie2Name
- See Also:
- Constant Field Values
-
-
Method Detail
-
applyCookiesToRequest
static void applyCookiesToRequest(HttpConnection.Request req, java.net.HttpURLConnection con) throws java.io.IOException
Pre-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:
java.io.IOException
-
requestCookieSet
private static java.util.LinkedHashSet<java.lang.String> requestCookieSet(Connection.Request req)
-
asUri
static java.net.URI asUri(java.net.URL url) throws java.io.IOException- Throws:
java.io.IOException
-
storeCookies
static void storeCookies(HttpConnection.Request req, java.net.URL url, java.util.Map<java.lang.String,java.util.List<java.lang.String>> resHeaders) throws java.io.IOException
- Throws:
java.io.IOException
-
-