zoukankan      html  css  js  c++  java
  • postman安装Postman Interceptor 插件

    做后端开发避免不了进行接口调试,但是一般的项目都是前后端分离的,如果把前端代码下到本地,较为费事,这个时候就需要一个可以进行接口调试的工具。Postman就是一个不错的选择。
    Postman是什么?
        Postman是一种网页调试与发送网页http请求的chrome插件。我们可以用来很方便的模拟get或者post或者其他方式的请求来调试接口。
    怎样使用?
        使用Postman如果通过自己拼接url,自己造数据,是非常麻烦的。因此选择Postman+Postman interceptor,使用Postman interceptor可以拦截到网页请求,同时传到postman的history列表中,然后我们只需要在postman中修改一下url就可以直接send了。

    后来经过仔细对比研究发现,postman有一个chrome插件 Postman Interceptor,可以让postman中发送请求的时候使用这个网站的浏览器cookie。我同事用了这个插件,发送请求的时候带上了自己的cookie,所以才能访问。

    于是仔细研究了一下这款chrome Postman Intercepto插件。

    Postman Interceptor的主要功能

    记录浏览器请求并直接导入到Postman

    可添加Filter,对浏览器中的请求进行过滤

    如何安装Postman Interceptor?

    1. 下载Postman Intercepter chrome插件,其格式是一个crx文件。

    2. 在谷歌中打开:chrome://extensions/

    3. 拖动crx文件到chrome://extensions/页面。

    4. 在“要添加‘Postman interceptor’吗”对话框上点击“添加扩展程序”。

    5. 然后就可以看到浏览器右上角的postman interceptor 工具图标

    Postman Intercepter使用方法

    1.在Postman工具中打开postman Intercepter功能

    2. 如果只需要测试特定网站,可以在 postman interceptor插件中设置 Filter requests。

    Filter requests默认是“.*”,表示捕获所有的网站。如果只想要捕获百度,可以在Filter requests里输入“baidu”。

    3. 在chrome中进行操作,比如打开百度,然后搜索关键字“hello”,然后点击“百度一下”。

    4. 打开 postman interceptor。可以看到 “last 10 requests“。

    5. 打开Postman,可以看到“History”显示chrome中进行的操作。

    6. 然后就可以在Postman对 request进行修改,过滤,以及编写测试。

    Postman Interceptor,可以让postman中发送请求的时候使用这个网站的浏览器cookie。发送请求的时候带上了自己的cookie,如果在尝试获取数据时不能访问,可以考虑Postman Interceptor

    这款插件的下载地址:http://www.cnplugins.com/devtool/postman-interceptor/download.html

    也发了一个很好的chrome插件网,chrome插件几乎在这个网站上都能找到。



    作者:xiaolanzi007
    链接:https://www.jianshu.com/p/da09e1f399c7
    來源:简书
    简书著作权归作者所有,任何形式的转载都请联系作者获得授权并注明出处。
  • 相关阅读:
    OA
    Asp.net 将js文件打包进dll 方法
    ASP.NET编程中的十大技巧
    jquery 1.2.6 中文注释解析
    javascript 构造函数和方法
    asp.net命名空间
    .ascx和网页.aspx之间的交互方式
    windows 2003局域网共享设置
    javascript高级编程
    程序员需要具备的基本技能
  • 原文地址:https://www.cnblogs.com/wyff/p/9365964.html
Copyright © 2011-2022 走看看