Object Creation
Code Block | ||
---|---|---|
| ||
let CookieStoreClass = require("@brightsign/cookiestore"); let cookieStore = new CookieStoreClass(); |
Cookie
getCookies()
Code Block | ||
---|---|---|
| ||
Array<Cookie> getCookies() |
Gets cookies from the containing browser.
[domain
string] domain: Specifies the hosts that are allowed to receive the cookie, including subdomains.[path
string] path: To send the Cookie header, this URL path must exist in the URL request.[name
string] name: The name of the cookie[value
string] value: The value of the cookie
Example
To list the cookies saved on a browser instance on a console:
Code Block | ||
---|---|---|
| ||
let CookieStoreClass = require("@brightsign/cookiestore"); let cookieStore = new CookieStoreClass(); let cookies = cookieStore.getCookies(); cookies.forEach((cookie) => {console.log("Cookie domain: " + cookie.domain + " Cookie path:" + cookie.path + " Cookie name:" + cookie.name + " Cookie value:" + cookie.value)}); |