英文:
Add session cookie in Postman query
问题
我想对一个 API 端点提交 GET 请求,但我不知道如何添加会话 cookie,以便我的请求成功,我通过身份验证。当我发送请求时,我收到如下内容:
{
"timestamp": "2020-04-07T14:39:56.070+0000",
"status": 401,
"error": "Unauthorized",
"message": "Unauthorized",
"path": "/api/fridge/recommended-dishes"
}
英文:
I want to submit a GET request against an api endpoint but I dont know how to
add the session cookie so my request is successful
and I get through the authentication. When I send my request, I get this:
{
"timestamp": "2020-04-07T14:39:56.070+0000",
"status": 401,
"error": "Unauthorized",
"message": "Unauthorized",
"path": "/api/fridge/recommended-dishes"
}
答案1
得分: 0
你需要在Postman中启用Cookie拦截器。详细信息请查看https://learning.postman.com/docs/postman/sending-api-requests/interceptor/。
英文:
You have to enable cookie interceptor in postman https://learning.postman.com/docs/postman/sending-api-requests/interceptor/
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论