V
V
Vyacheslav Lebedev2015-02-19 13:08:44
Node.js
Vyacheslav Lebedev, 2015-02-19 13:08:44

How to get to cookies in res.cookie?

How do I view cookies:

var cookie = res.cookie('cookieName');
  console.log(cookie);

What the console gives me:
...
  secret: undefined,
  cookies: { cookieName: '[{"unique":1,"name":"Боржоми","sizeStr":"1л","priceStr":"150руб","orderCount":1,"totalPriceName":150}]' },
  signedCookies: {},
  ...

How to get a cookie from such a record?
Thanks a lot! :)
UPD: Issue resolved: req.cookies.cookieName

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question