curl
CLITransfer data from or to a server using various protocols.
1 views
Installation
apt
sudo apt install curlHomebrew
brew install curlLinks
License
curl (MIT-like)AI Agent Notes
Universal URL transfer tool supporting HTTP, FTP, SMTP and more
When to use
Downloading files, calling APIs, scripting HTTP requests
Examples
curl -s https://api.example.com/datacurl -X POST -d '{"key":"val"}' -H 'Content-Type: application/json' URL
Proven Recipes
GET request with JSON output🟢 99% success
curl -s https://api.example.com/data | jq '.'POST JSON data🟢 97% success
curl -s -X POST -H 'Content-Type: application/json' -d '{"key":"value"}' https://api.example.com/endpoint⚠ Common failures (1)
- 415 Unsupported Media Type → Ensure -H 'Content-Type: application/json' is included
Download file🟢 98% success
curl -L -o output.zip https://example.com/file.zip⚠ Common failures (1)
- File is HTML instead of binary → Add -L to follow redirects
Send request with auth bearer token🟢 98% success
curl -s -H 'Authorization: Bearer TOKEN' https://api.example.com/me