美文网首页linux
http命令工具

http命令工具

作者: leomei91 | 来源:发表于2017-05-10 11:30 被阅读0次

    安装

    yum install python2-httpie -y
    
    

    使用

    [root@centos7 ~]# http -a django:django http://192.168.1.50:8000/users/
    HTTP/1.0 200 OK
    Allow: GET, POST, OPTIONS
    Content-Length: 152
    Content-Type: application/json
    Date: Wed, 10 May 2017 03:24:00 GMT
    Server: WSGIServer/0.1 Python/2.7.5
    Vary: Accept, Cookie
    X-Frame-Options: SAMEORIGIN
    
    {
        "count": 1, 
        "next": null, 
        "previous": null, 
        "results": [
            {
                "email": "django@leo.com", 
                "groups": [], 
                "url": "http://192.168.1.50:8000/users/1/", 
                "username": "django"
            }
        ]
    }
    
    

    相关文章

      网友评论

        本文标题:http命令工具

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