postman interceptor使用介绍

时间:2024-05-19 17:32:35

众所周知,postman在接口调试上有一定优势,使用较为便捷。但有时候一个个放入header和body参数有些繁琐,那么,是不是会有个简便的方法呢?

答案嘛,当然是肯定的啦。

接下来要介绍下postman interceptor这个插件的使用了。

在使用时,需要在Chrome浏览器中安装postman interceptor插件,并在电脑中安装postman客户端,注意,客户端和Chrome需登录同一个账号,我都是使用Chrome账号登录的,postman本身的注册账号我没有试过。。。

1.首先检查客户端是否打开postman interceptor

具体方法:

在页面右上角点击设置按钮,选择Settings,出现设置选项界面

postman interceptor使用介绍

把相关interceptor选项均开启,确保数据能够正确从浏览器同步至客户端中

postman interceptor使用介绍

然后在客户端界面上方打开interceptor,右侧的按钮表示正在同步中,可手动触发信息同步

postman interceptor使用介绍

2.在Chrome浏览器中打开postman interceptor

postman interceptor使用介绍.*配置拦截所有请求,可以自己修改


此后,在Chrome中进行的任何http请求信息均会同步至postman客户端中,方便调试,不需要手动添加那么多参数了,而且一般都是能正确返回参数的。