getCookies
Retrieves all cookies for the current domain as a list
. Each cookie is returned as a map
having separate entries for every field in cookie.
getCookies()
#
Returns- A
list
of cookies or emptylist
if none found. Each cookie inlist
is represented by amap
having separate entries for every field in cookie. Following describes keys and the corresponding values:name
: Name of cookie asstring
value
: Value of cookie asstring
path
: Path of cookie asstring
domain
: Host name of cookie asstring
expiry
: Remaining cookie expiration time in millisecondssecure
:boolean
indicatingsecure
status of cookiehttpOnly
:boolean
indicatinghttpOnly
status of cookie
#
ExampleallCookies = getCookies()print(allCookies)/*Prints following:[ { name: my-cookie, value: 1199, path: /, domain: example.com, expiry: 3600000, secure: true, httpOnly: false }, { name: user-cookie, value: 1, path: /, domain: example.com, expiry: 3600000, secure: true, httpOnly: false }]*/