Class CefriumCookieManager
java.lang.Object
com.cefrium.CefriumCookieManager
The cookies of one
CefriumProfile, from
CefriumProfile.getCookieManager(). Like
android.webkit.CookieManager, with the same Set-Cookie
syntax, but per profile and asynchronous: each method returns at once and
calls its callback on the UI thread. Callable from any thread.-
Method Summary
Modifier and TypeMethodDescriptionvoidWrites the cookies to disk now rather than later;donemay be null.voidThe cookiesurlwould send, as aCookieheader:"a=1; b=2".voidgetCookies(String url, Consumer<List<CefriumCookie>> result) The cookiesurlwould send; with a null or empty URL, every cookie.voidremoveAllCookies(Consumer<Integer> done) Removes every cookie of the profile.voidremoveCookies(String url, String name, Consumer<Integer> done) Removes the cookies ofurl, only those namednamewhen it is not null.voidSets a cookie forurlfrom aSet-Cookievalue, e.g.
-
Method Details
-
setCookie
Sets a cookie forurlfrom aSet-Cookievalue, e.g."id=42; Max-Age=3600; Path=/; Secure; HttpOnly; SameSite=Lax".Expires,Max-Age(which wins),Domain,Path,Secure,HttpOnlyandSameSiteare read; without an expiry it is a session cookie.donegets whether the engine accepted it (it refuses, for example,SameSite=NonewithoutSecure); it may be null.- Throws:
IllegalArgumentException- if the value has noname=value
-
getCookie
-
getCookies
The cookiesurlwould send; with a null or empty URL, every cookie. -
removeCookies
-
removeAllCookies
-
flush
Writes the cookies to disk now rather than later;donemay be null.
-