Network
curl — HTTP from the terminal
curl for everyday HTTP: GET and POST requests, JSON bodies, auth headers and tokens, and downloading or resuming files.
GET
curl url — basic
curl -s url — silent (no progress)
curl -I url — headers only
curl -L url — follow redirects
POST / PUT
curl -X POST -d "key=val" url — form data
curl -X POST -H "Content-Type: application/json" -d '{"key":"val"}' url — JSON
curl -X PUT --data-binary @file.json url — JSON from file
Auth
curl -u user:pass url — basic auth
curl -H "Authorization: Bearer TOKEN" url — bearer token
Download
curl -O url — save with remote name
curl -o name url — save as name
curl -C - -O url — resume interrupted download