httpie.cheat 655 B

12345678910111213141516171819202122232425262728
  1. % httpie, http
  2. # send a get http request
  3. http <url>
  4. # send a http request
  5. http <method> <url>
  6. # send an authenticated http request
  7. http -a <username>:<password> <method> <url>
  8. # send a http request with a json body
  9. http <method> <url> <bodykey>=<bodyvalue>
  10. # send a http request with a form body
  11. http -f POST <url> <bodykey>=<bodyvalue>
  12. # send a http request and see the request as well as the response
  13. http -v <url>
  14. # send a post http request wih a body from a file
  15. http <method> <url> < <file>
  16. # send a http request wih a custom header
  17. http <method> <url> <headername>:<headervalue>
  18. $ file: ls
  19. $ method: echo -e 'GET\nPOST\nPUT\nDELETE\nPATCH'