getNamedCookie
Retrieves cookie for the current domain by given name.
getNamedCookie(name)Parameters#
name: Name of the cookie
Returns#
- A
maprepresenting the cookie or no value if it's not found. Following describes keys and the corresponding values in cookiemap:name: Name of cookie asstringvalue: Value of cookie asstringpath: Path of cookie asstringdomain: Host name of cookie asstringexpiry: Remaining cookie expiration time in millisecondssecure:booleanindicatingsecurestatus of cookiehttpOnly:booleanindicatinghttpOnlystatus of cookie
Example#
cookie = getNamedCookie(my-cookie)print(cookie)/*Prints following:{ name: my-cookie, value: 1199, path: /, domain: example.com, expiry: 3600000, secure: true, httpOnly: false}*/