在 Postman 查询中添加会话 cookie

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"
}

您必须在 postman 中启用 cookie 拦截器 https://learning.postman.com/docs/postman/sending-api-requests/interceptor/