1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2024-11-01 03:17:57 +01:00

Merge branch 'jkbrzt-http'

This commit is contained in:
Igor Shubovych 2016-02-29 11:48:02 +02:00
commit bba46178fa

31
pages/common/http.md Normal file
View file

@ -0,0 +1,31 @@
# http
> HTTPie: HTTP client, a user-friendly cURL replacement.
- 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`