mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-17 16:49:35 +00:00
Update cheatsheets
This commit is contained in:
41
linux/httpie
Normal file
41
linux/httpie
Normal file
@@ -0,0 +1,41 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# httpie
|
||||
|
||||
> A user friendly HTTP tool.
|
||||
> More information: <https://github.com/httpie/httpie>.
|
||||
|
||||
- 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}}`
|
||||
|
||||
- Follow redirects and show intermediary requests and responses:
|
||||
|
||||
`http --follow --all {{https://example.com}}`
|
||||
Reference in New Issue
Block a user