mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-06-05 03:26:00 +02:00
create http.md
initial
This commit is contained in:
parent
b0f7b04e8b
commit
1e23303e5f
1 changed files with 32 additions and 0 deletions
32
pages.pl/common/http.md
Normal file
32
pages.pl/common/http.md
Normal file
|
@ -0,0 +1,32 @@
|
|||
# http
|
||||
|
||||
> HTTPie: HTTP client, aims to be easier to use than cURL.
|
||||
> More information: <https://httpie.org>.
|
||||
|
||||
- Download a URL to a file:
|
||||
|
||||
`http -d {{example.org}}`
|
||||
|
||||
- Send form-encoded data:
|
||||
|
||||
`http -f {{example.org}} {{name='bob'}} {{profile_picture@'bob.png'}}`
|
||||
|
||||
- Send JSON object:
|
||||
|
||||
`http {{example.org}} {{name='bob'}}`
|
||||
|
||||
- Specify an HTTP method:
|
||||
|
||||
`http {{HEAD}} {{example.org}}`
|
||||
|
||||
- Include an extra header:
|
||||
|
||||
`http {{example.org}} {{X-MyHeader:123}}`
|
||||
|
||||
- Pass a user name and password for server authentication:
|
||||
|
||||
`http -a {{username:password}} {{example.org}}`
|
||||
|
||||
- Specify raw request body via `stdin`:
|
||||
|
||||
`cat {{data.txt}} | http PUT {{example.org}}`
|
Loading…
Add table
Reference in a new issue