get-cookie obtains string <cookie value> of a cookie with the name given by string <cookie name>. A cookie would be obtained via incoming request from the client (such as web browser) or it would be set using set-cookie.
The value of cookie is stored in <cookie value>.
Cookies are often used to persist user data on the client, such as for maintaining session security or for convenience of identifying the user etc.
You can obtain multiple cookies separated by a comma:
get-cookie c = "mycookie", c1 = "mycookie1", c2="mycookie2"
Copied!
Examples
Get value of cookie named "my_cookie_name" - variable my_cookie_value will hold its value: