1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 07:44:55 +02:00
tldr/pages/common/http.md
Lucas Gabriel Schneider a5fe31bc47
multiple pages: format technical tokens (#5119)
Co-authored-by: bl-ue <54780737+bl-ue@users.noreply.github.com>
Co-authored-by: Starbeamrainbowlabs <sbrl@starbeamrainbowlabs.com>
2021-01-31 12:05:18 -05:00

32 lines
650 B
Markdown

# 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}}`