Skip to content
This repository was archived by the owner on Feb 20, 2025. It is now read-only.

Work with cookies

Dmytro edited this page Jan 30, 2017 · 2 revisions

Cookie is a small piece of data sent from a website and stored on the user's computer by the user's web browser while the user is browsing wiki.

You can get access to work with cookie using cookie methods of request object:

request.cookies();                         // adds cookies to the map
request.cookie("example");                 // get access to the cookie via name
request.cookie("example", "value");        // set cookie with a value
request.cookie("example", "value", 1000);  // set cookie with max-age term (in sec)
request.removeCookie("example");           // remove cookie

Clone this wiki locally