Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting cookie data on an express Response object?

I am just doing some API tests and I am trying to verify that the cookie data sent down is correct, however I cannot find any documentation around getting cookies from the response object, only from the request.

So is there a quick way to do this like you would do with the requests req.cookies["myCookie"], I know I can get the header and get the set-cookie one from there but its a bit of a mess trying to parse out the cookie data from there manually.

like image 354
Grofit Avatar asked Sep 30 '22 17:09

Grofit


1 Answers

Could not find a solution, had to end up doing a text match on the set-cookie header.

like image 190
Grofit Avatar answered Oct 20 '22 10:10

Grofit