Answer the question
In order to leave comments, you need to log in
NodeJS Nightmare How to set cookies before visiting the site?
There is code from the Nightmare module example that shows how to set cookies for a site:
nightmare
.goto('http://google.com')
.cookies.set({
name: 'token',
value: 'some token',
path: '/query',
secure: true
})
// ... other actions ...
.then(() => {
// ...
})
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question