Syntax
curl [parameters] [URL]
Display the command usage and lists most common options:
curl --help
Display the command usage and list all available options:
curl --help all
Basic Operations
Debugging & Info
SSL (Secure Socket Layer)
Common Options
| Option |
Description |
| -d, --data |
HTTP POST data |
| -f, --fail |
Fail fast with no output on HTTP errors |
| -h, --help |
Get help for commands |
| -I, --include |
Include protocol response headers in output |
| --output |
Write to file instead of stdout |
| -O, --remote-name |
Write output to a file named as the remote file |
| --silent |
Silent mode |
| -T, --upload-file |
Transfer local file to destination |
| user:password |
Server user and password |
| -A, --user-agent |
Send User-Agent to server |
Authentication & Headers
| Command |
Description |
| curl -u username:password |
HTTP Basic Authentication |
| curl -H "Authorization: Bearer YOUR_TOKEN" http://example.com |
Add headers |
Data Transfer
Other Useful Options
Notes
- Replace
example.com with your actual endpoint.
- Combine flags as needed for advanced use cases.