我正在玩并学习一点表达所以我正在使用与我的用户相关的一些数据发布到特定路线,并且我正在尝试从expressJs服务器创建一个cookie并将其与回复一起发回。但不幸的是没有发生任何事我正在和Postman一起测试这条路线,它告诉我:
No cookies were returned by the server
这是我正在尝试的方式
res.status(200).cookie('rememberme', '1', { expires: new Date(Date.now() + 900000), httpOnly: false }).send('Cookie sent...?');
我可能正在做或丢失一些愚蠢的东西,那么这有什么问题?请问任何想法??
答案 0 :(得分:0)
If you use older version of Postman, the one that runs in the browser, you would be able to see the cookie.
However, the new one doesn't run in the browser anymore, it becomes a seperate chrome app, so it doesn't read browser cookies anymore. In order to see the cookie, you will need to install the postman interceptor