📡 You're offline — showing cached content
New version available!
Quick Access
Tutorials Linux Command Line curl and wget

curl and wget

5 min read
curl makes HTTP requests from the terminal: curl -X POST -H 'Content-Type: application/json' -d '{"key":"val"}' https://api.example.com. wget downloads files with resume support. Both are essential for automation.

Downloading and API Calls

# curl
curl https://api.github.com/users/torvalds
curl -X POST -H "Content-Type: application/json" \
     -d '{"key":"value"}' https://api.example.com/data
curl -o output.html https://example.com
curl -u user:pass https://api.example.com  # basic auth

# wget
wget https://example.com/file.zip
wget -q -O file.zip URL  # quiet, custom name
wget -c URL              # resume partial download