美文网首页
用httpie插件进行post请求模拟

用httpie插件进行post请求模拟

作者: boris30911 | 来源:发表于2019-02-26 15:22 被阅读0次

 1. 安装Homebrew

     $ /usr/bin/ruby -e "$(curl -fsSL/usr/bin/ruby -e "$(curl -    fsSLhttps://raw.githubusercontent.com/Homebrew/install/master/install)"

  2. 安装httpie

      $ brew install httpie

   3. httpie使用举例

          第一种方式:

        $ http -f POSTurl地址id:=1465 updateTimes=2018-12-30 10:30:11

        非字符串参数用id:=1465

     第二种方式:读取包含参数的json文件

       $ http POSTurl地址@myRingParams.json文件路径

    myRingParams.json文件中的参数格式(必须标准的json格式)

      {

                "requestData": {

                 "userId": 1465

                }

      }

相关文章

网友评论

      本文标题:用httpie插件进行post请求模拟

      本文链接:https://www.haomeiwen.com/subject/axwayqtx.html