So I've been reading through some older SO posts and it seems that setting cookie values via express is a mess since the part of the lib one needs to modify cookies is now available as middle-ware and not part of the original but I can't really find any good documentation on the matter. These posts are all from ~2013.
Is there a new way to set the value of a cookie that works in Node?
This is for a web-scaper.
I've tried Cookies, Express, and CookieParser, all to no avail. At this point I don't know if its me doing something wrong or something else.
All I want to do is set a cookie with a specific name to a specific value.
I've been able to do this in CasperJS/PhantomJS with:
phantom.addCookie({
'name': 'Added-Cookie-Name',
'value': 'Added-Cookie-Value',
'domain': 'domain url'
});
but I haven't found a similar way to do it successfully in Node.
Could anyone post a simple example for any method they know of that currently works in Node?