postman 拦截重发 HTTP 请求
类似于 Fiddler, postman 也可以实现对于 HTTP 请求的拦截,native app 和 chrome app 实现的方式不太一样,native app 是通过内建代理服务器实现的,chrome app 是通过 Postman Interceptor 插件实现的,以下分别介绍。
需要注意的是,根据官方文档的描述( https://www.getpostman.com/docs/v6/postman/sending_api_requests/capturing_http_requests),native app 目前暂时无法拦截 HSTS 模式的 HTTPS 的请求,如果需要拦截这种类型的 HTTPS 请求,只能暂时使用 chrome app + Postman Interceptor 插件的形式,不过只要登陆同一个账号,测试用例在 native app 和 chrome app 之间是可以同步的,影响不大。
native app 内建代理方式
postman native app 下载地址:https://www.getpostman.com/apps,启动内建代理服务器步骤如下:
1. 进行 postman 的代理服务器设置,之后点击 connect 按钮即可启动 postman 的内建代理服务器;