We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
node-mocks-http is an invaluable tool
I would like to access the cookies from the createResponse API
In the image attached when mockResponse is logged on an API that returns a cookie it's available on the response but can't be accessed or so I think
(url)
maybe I'm doing something wrong, would like to guided
The text was updated successfully, but these errors were encountered:
Are you trying to read set-cookie header in the test or application code?
set-cookie
In application code you can use res.get('set-cookie') https://expressjs.com/en/4x/api.html#res.get In the test code try res._getHeaders()['set-cookie'] https://github.com/eugef/node-mocks-http/blob/master/lib/mockResponse.js#L802
res.get('set-cookie')
res._getHeaders()['set-cookie']
Sorry, something went wrong.
yes I'm trying to get the cookie to set it in another request to send
No branches or pull requests
node-mocks-http is an invaluable tool
I would like to access the cookies from the createResponse API
In the image attached when mockResponse is logged on an API that returns a cookie it's available on the response but can't be accessed or so I think
(url)
maybe I'm doing something wrong, would like to guided
The text was updated successfully, but these errors were encountered: