HTTPie 简单使用

Posted on Posted in linux
文章目录[隐藏]

httpie

root@ubuntu:~# http baidu.com
HTTP/1.1 200 OK # http请求
Accept-Ranges: bytes
Cache-Control: max-age=86400
Connection: Keep-Alive
Content-Length: 81
Content-Type: text/html
Date: Wed, 23 May 2018 05:50:29 GMT
ETag: "51-47cf7e6ee8400"
Expires: Thu, 24 May 2018 05:50:29 GMT
Last-Modified: Tue, 12 Jan 2010 13:48:00 GMT
Server: Apache

<html> # 网页源码
<meta http-equiv="refresh" content="0;url=http://www.baidu.com/">
</html>

参数

  • http -f POST liuhonghe.me username=user password=password # 模拟提交表单,自动json格式
  • http -v liuhonghe.me # 显示详细的请求
  • http -h liuhonghe.me # 只显示header
  • http -b liuhonghe.me # body
  • http -dc0 w.zip https://cn.wordpress.org/wordpress-4.9.4-zh_CN.zip # 下载文件,断点续传,重命名
» 转载请注明来源:若我若鱼 » HTTPie 简单使用

Leave a Reply

Your email address will not be published. Required fields are marked *

7 + four =