Postman Interceptor 获取浏览器请求
2019-03-27 本文已影响0人
乘风破浪的姐姐
Postman是一种网页调试与发送网页http请求的chrome插件。它可以很方便的模拟http的各种请求,从而进行接口的调试。
如何使用Postman拦截网页请求,并获取网页的请求进行后续的测试呢?这就需要使用Postman interceptor插件。
Interceptor 可以直接从浏览器中获取请求,并保存到Postman的History中。 它可以大大缩短API配置的时间,让Postman和Chrome浏览器共用Chrome的Cookies。
以下详细介绍Interceptor 的安装和使用
1、安装 Interceptor插件
)
Interceptor是Chrome的一个插件,可以从Chrome网上商店安装。
2、启用 Interceptor
1)开启Interceptor插件,设置需要抓取的网站请求

2)同样的方式安装 Postman插件
3)打开Postman,右上角点击图中图标,开启Interceptor

4)打开Chrome浏览器,并访问Interceptor中设置的域名链接,请求就自动被Postman抓取,并在Postman的History显示

5)如果不想使用Chrome中的Postman插件,可以直接安装Postman客户端,捕获浏览器请求方式如下。
a、设置IE或者Chrome的代理,这里使用的是 SwitchyOmega插件设置代理

b、打开Postman客户端,打开Proxy设置,并设置代理端口(需要与浏览器代理端口一致)和抓取的保存位置


c、打开浏览器,正常请求,请求就自动被Postman抓取,并在Postman的History显示
END
如果你喜欢我的分享,那就在右下角点个喜欢吧
你的鼓励是我最大的动力来源,在此深表感恩
软件测试的路上,我们可以互相关注,相互学习,共同进步,微信ID:929194573