使用postman测试接口请求时,部分接口可能需要配置cookies,postman提供了专门配置cookies和展示cookies的位置。
一、接口请求头中的cookies
1.cookie可以作为请求头的一个参数配置,也有单独的入口可以配置多个cookies。
点击cookies按钮

填写域名,点击添加:

设置cookie的值,及cookies使用的路径(Path),如果是“Path=/”,则是该域名下所有的接口。
设置完成后,保存cookie:

对应域名的请求头下显示新增的cookie:

同样在这个cookies弹框也可以编辑已有的cookies。

二、返回结果中的cookies
点击响应结果左上角的cookies标签页,会展示当前接口的使用的cookie:

网友评论