Can i Access items that i set in Response Object through Request Object in express js?

Viewed 86

I have this code

res.cookie("jid", token, {
httpOnly: false,
path: "/",
  });
console.log("cookee is : ",res.cookie.name);// cokkie name not accessible
console.log("cookee is : ",req.cookies); // here it is accessible

So i am surprised that i set cookiee in res object but i was not able to access it throuhg res object but i was able to access it throug req object.

1 Answers
Related