Postman+Postman interceptor使用

    做后端开发避免不了进行接口调试,但是一般的项目都是前后端分离的,如果把前端代码下到本地,较为费事,这个时候就需要一个可以进行接口调试的工具。Postman就是一个不错的选择。

Postman是什么?

    Postman是一种网页调试与发送网页http请求的chrome插件。我们可以用来很方便的模拟get或者post或者其他方式的请求来调试接口。

怎样使用?

    使用Postman如果通过自己拼接url,自己造数据,是非常麻烦的。因此选择Postman+Postman interceptor,使用Postman interceptor可以拦截到网页请求,同时传到postman的history列表中,然后我们只需要在postman中修改一下url就可以直接send了。

安装:

    首先到文末的链接处下载压缩文件。在本地解压

    然后chrome浏览器,更多工具->扩展程序->加载已解压的扩展程序,然后选择刚刚解压文件就可以了。

使用:

    浏览器中,interceptor要打开(图1),然后postman中的interceptor选项也要打开(图2)就可以使用了

  图1:

   

图2:

 

 

遇坑:

    postman和postman interceptor版本一定要相同。(很重要==||)

    可能遇到图1这种问题。这个是因为图2红框中,文件名前边多了一个"_"只要去掉就好了。(在文末链接的压缩文件中不会遇到,我已经改了~~)

图1:

 

图2:

 

 

下载文件url:http://download.csdn.net/download/believe__dream/10146850

    

  • 3
    点赞
  • 20
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
要安装PostmanPostman Interceptor,首先需要按照特定的步骤进行操作。首先,在谷歌浏览器上安装Postman Interceptor。将postman.crc的.crc后缀改为.rar,解压缩文件,并将其拖入谷歌浏览器的扩展程序中。完成这一步骤后,再安装Postman。接下来,需要修改Postman解压文件目录下的/js文件夹中的requester.js和runner.js文件。将window.postman_interceptor_id = ('xxxxx'); 引号中的内容替换成Postman Interceptor对应的ID,共有两处需要替换。然后,在谷歌浏览器中启用Postman Interceptor,并在Postman中打开Interceptor开关。需要注意的是,当Interceptor开启时,Postman发送的请求会一直处于Loading状态,需要关闭Interceptor才能正常访问。另外,为了保证兼容性,需要确保PostmanPostman Interceptor的版本对应。完成以上步骤后,就成功安装了PostmanPostman Interceptor。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *2* [Postman+Postman interceptor的安装和使用-解决把chrome浏览器登录状态同步到postman进行有依赖的接口测试 ...](https://blog.csdn.net/anmei1912/article/details/101614359)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] - *3* [postmanpostman interceptor的安装](https://blog.csdn.net/heni6560/article/details/125523851)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值