Cheatography
https://cheatography.com
HTTPie—aitch-tee-tee-pie—is a command line HTTP client with an intuitive UI, JSON support, syntax highlighting, wget-like downloads, plugins, and more.
Cheatsheet version
Version |
1.0.2 |
Last update |
2/15/2018 |
HTTPie version |
0.9.8 |
Basic usage
GET |
|
GET |
http http://localhost:8080
|
Help |
|
POST form |
http -f POST localhost:8080 name=value
|
POST json |
http POST localhost:8080 name=value
|
POST json |
http -j POST localhost:8080 name=value
|
POST json |
http POST localhost:8080 < data.json
|
PUT |
similar to POST |
DELETE |
similar to GET |
Display request & response (verbose) |
|
Download |
http localhost:8080/file > file
|
Download wget style |
http -d localhost:8080/file
|
Upload |
http localhost:8080 < file
|
|
|
HTTP request headers
Set headers |
http localhost:8080 User-Agent:Bacon/1.0 'Cookie:valued-visitor=yes;foo=bar' X-Foo:Bar Referer:http://httpie.org/
|
Default HTTPie request headers |
GET / HTTP/1.1 Accept: / Accept-Encoding: gzip, deflate User-Agent: HTTPie/<version> Host: <taken-from-URL> |
List of headers |
|
Common request headers |
Host, User-Agent, Accept, Accept-Language, Accept-Encoding, Accept-Charset, Keep-Alive, Pragma, Cache-Control, Cookie, Content-Type, Content-Length |
Authentication
Basic auth |
http -a username:password POST localhost:8080
|
Basic auth (pw prompt) |
http -a username POST localhost:8080
|
Basic auth (empty pw) |
http -a username: POST localhost:8080
|
Digest auth |
http -A digest -a username:password POST localhost:8080
|
Auth plugins |
OAuth, SPNEGO, NTLM, JWT, more |
|
Created By
camluc.tech
Metadata
Favourited By
Comments
FluxSauce, 20:01 30 Mar 18
Nice! You should include the shortcut for localhost, so instead of localhost:8000 you can just type :8000
Add a Comment
Related Cheat Sheets
More Cheat Sheets by clucinvt