接口测试-Postman Interceptor拦截浏览器请求到postman

之前用Postman Interceptor拦截请求每次都需要打开chrome的postman客户端,升级之后,同时打开Postman Interceptor和Postman可以直接将拦截的请求发送到postman客户端,比之前方便了很多。

1.安装Postman Interceptor

下载Postman Intercepter chrome插件,在chrome扩展程序,搜索Postman Interceptor安装即可

chrome扩展程序

安装成功后可以在菜单栏看到这个图标,点开后打开Capture requests。

Postman Interceptor打开Capture requests

2.设置postman接收请求

打开postman,点击Capture

requests and cookies,切换到Interceptor,打开Capture Requests,看到INTERCEPTOR

CONNECTED显示为绿色则证明连接成功,这时候就可以在chrome上发送请求了,chrome的请求默认会保存在history文件夹中,拦截到的请求就可以在postman操作啦

postman打开Capture requests

3.添加过滤器

有时候只需要拦截部分请求,但Postman Interceptor默认拦截所有请求,此时可以通过添加过滤器只拦截需要的请求点击show filters输入接口地址关键词、HTTP请求方法

URL Contains:需要拦截的接口地址包含关键词

Methods:HTTP请求方法比如PUT、 GET、 POST

过滤器

你可能感兴趣的:(接口测试-Postman Interceptor拦截浏览器请求到postman)