HTTPie Friendly HTTP client
Light · Postcard
102 × 152 mm · PDF
Dark · Postcard
102 × 152 mm · PDF
Ink saver · Postcard
102 × 152 mm · PDF
Light · A4 landscape
297 × 210 mm · PDF
Dark · A4 landscape
297 × 210 mm · PDF
Ink saver · A4 landscape
297 × 210 mm · PDF
Light · A3 landscape
420 × 297 mm · PDF
Dark · A3 landscape
420 × 297 mm · PDF
Ink saver · A3 landscape
420 × 297 mm · PDF
Start here
http <url>
http POST <url> name=Ann
http <url> X-Key:abc
http <url> page==2
http -f POST <url> a=1
http -v <url>
http -d <url>
http :3000/apiConcepts
| Item | Becomes |
|---|---|
Name:value |
Header |
q==value |
Query parameter |
k=value |
String field |
k:=42 |
Raw JSON (number, bool, list) |
k=@file |
Field from text file |
k@file |
File upload (with -f) |
- Items headers, query, data
- Request JSON by default
- Response formatted, coloured
- Output -p, -b, -h, -o
Requests
http <url>
http POST <url> <key>=<value>
http PUT <url> <key>=<value>
http DELETE <url>
https <url>
http :3000/pathhttp <url> <key>:=<json>
http <url> < <file>
http HEAD <url>
Headers and query
http <url> <Name>:<value>
http <url> <Name>:
http <url> <key>==<value>
http --follow <url>
Forms and files
http -f POST <url> <key>=<value>
http -f POST <url> <key>@<file>
Output
http -v <url>
http -h <url>
http -b <url>
http -p <what> <url>
http --offline POST <url> <items>
http --pretty none <url>
Auth
http -a <user>:<pass> <url>
http -a <user> <url>
http -A bearer -a <token> <url>
http -A digest -a <user>:<pass>
<url>
http --verify no <url>
http --cert <file> --cert-key <key>
<url>
Sessions
http --session <name> -a <u>:<p>
<url>
http --session <name> <url>
Downloads
http -d <url>
http -d <url> -o <file>
http -dco <file> <url>
http <url> > <file>
Scripting and network
http --check-status <url>
http --ignore-stdin <url>
http --timeout <sec> <url>
http --proxy http:<proxy-url> <url>
http --debug <url>
http --helphttp --versionConfig
~/.config/httpie/config.json
{ "default_options": ["--style=fruity", "--pretty=all"], "disable_update_warnings": true}
Recipes
http --check-status POST api.example.com/items \ Authorization:"Bearer $TOKEN" \ name=widget price:=9.5 tags:='["a","b"]'
http --offline POST api.example.com/items name=widget# then drop --offline to send it
http --session=work -a ann https://api.example.com/loginhttp --session=work https://api.example.com/me
http -b --ignore-stdin api.example.com/items | jq '.[].id'



