mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-07-24 19:15:27 +02:00
httpie.md: add page (#1828)
This commit is contained in:
commit
43f484e479
1 changed files with 31 additions and 0 deletions
31
pages/linux/httpie.md
Normal file
31
pages/linux/httpie.md
Normal file
|
@ -0,0 +1,31 @@
|
|||
# httpie
|
||||
|
||||
> A user friendly command line HTTP tool.
|
||||
|
||||
- Send a GET request (default method with no request data):
|
||||
|
||||
`http {{https://example.com}}`
|
||||
|
||||
- Send a POST request (default method with request data):
|
||||
|
||||
`http {{https://example.com}} {{hello=World}}`
|
||||
|
||||
- Send a POST request with redirected input:
|
||||
|
||||
`http {{https://example.com}} < {{file.json}}`
|
||||
|
||||
- Send a PUT request with a given json body:
|
||||
|
||||
`http PUT {{https://example.com/todos/7}} {{hello=world}}`
|
||||
|
||||
- Send a DELETE request with a given request header:
|
||||
|
||||
`http DELETE {{https://example.com/todos/7}} {{API-Key:foo}}`
|
||||
|
||||
- Show the whole HTTP exchange (both request and response):
|
||||
|
||||
`http -v {{https://example.com}}`
|
||||
|
||||
- Download a file:
|
||||
|
||||
`http --download {{https://example.com}}`
|
Loading…
Add table
Reference in a new issue