Object type: PersistentCookieHandler
The representation of a persistent cookie handler object type for managing persistent cookies.
Methods
storeCookie | Adds a persistent cookie to the cookie store. |
getAllCookies | Gets all persistent cookies. |
removeCookie | Removes a specific persistent cookie. |
removeAllCookies | Removes all persistent cookies. |
storeCookie
function storeCookie(Cookie cookie) returns CookieHandlingError?
Adds a persistent cookie to the cookie store.
Parameters
- cookie Cookie
Cookie to be added
Return Type
(CookieHandlingError?)An http:CookieHandlingError
if there is any error occurred during the storing process of the cookie or else ()
getAllCookies
function getAllCookies() returns Cookie[ ] | CookieHandlingError
Gets all persistent cookies.
Return Type
(Cookie[ ] | CookieHandlingError)Array of persistent cookies stored in the cookie store or else an http:CookieHandlingError
if one occurred during the retrieval of the cookies
removeCookie
function removeCookie(string name, string domain, string path) returns CookieHandlingError?
Removes a specific persistent cookie.
Parameters
- name string
Name of the persistent cookie to be removed
- domain string
Domain of the persistent cookie to be removed
- path string
Path of the persistent cookie to be removed
Return Type
(CookieHandlingError?)An http:CookieHandlingError
if there is one occurred during the removal of the cookie or else ()
removeAllCookies
function removeAllCookies() returns CookieHandlingError?
Removes all persistent cookies.
Return Type
(CookieHandlingError?)An http:CookieHandlingError
if there is one occurred during the removal of all the cookies or else ()