安装
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"
}
]
}
网友评论