Added a httpie cheat sheet

This is one of the commands I use a bit more. Here's a sheet to help
others use it too.
This commit is contained in:
Billie Thompson 2020-03-15 12:30:08 +01:00
parent 48c2b64f7f
commit c0dec7fb15
No known key found for this signature in database
GPG key ID: C336012826D54BE7

28
cheats/httpie.cheat Normal file
View file

@ -0,0 +1,28 @@
% httpie, http
# send a get http request
http <url>
# send a http request
http <method> <url>
# send an authenticated http request
http -a <username>:<password> <method> <url>
# send a http request with a json body
http <method> <url> <bodykey>=<bodyvalue>
# send a http request with a form body
http -f POST <url> <bodykey>=<bodyvalue>
# send a http request and see the request as well as the response
http -v <url>
# send a post http request wih a body from a file
http <method> <url> < <file>
# send a http request wih a custom header
http <method> <url> <headername>:<headervalue>
$ file: ls
$ method: echo -e 'GET\nPOST\nPUT\nDELETE\nPATCH'