* Applying the snake_case convention throughout the repo
- Also removing the file extension where not needed
- Adding {{ }} on a few old pages
* Addressing concerns
- Added {{ }} where they were missed out
- Removed spaces inside {{ }}
- Reverting "file" to "filename" to make it clearer
* Fixing the comments on nc page
32 lines
598 B
Markdown
32 lines
598 B
Markdown
# 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`
|