1. 安装
- Windows
pip install --upgrade httpie
- Linux
apt-get install httpie
- macOS
brew install httpie
2. 使用
2.1 输入
- get + params
http httpbin.org/get name==Zarten zhihu_id==Zarten
- post + data
http httpbin.org/post name=Zarten zhihu_id=Zarten
- post + json
http httpbin.org/post user:='{"name": "john", "age": 10 }'
2.2 输出
- 输出body
http :8000/projects/ -b
- 输出header
http :8000/projects/ -h