mirror of
https://github.com/denisidoro/navi
synced 2024-11-22 19:43:06 +00:00
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:
parent
48c2b64f7f
commit
c0dec7fb15
1 changed files with 28 additions and 0 deletions
28
cheats/httpie.cheat
Normal file
28
cheats/httpie.cheat
Normal 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'
|
Loading…
Reference in a new issue