Download with a progress bar
Download a file, follow redirects and show a simple progress bar.
curl -L --progress-bar -o output.file https://example.com/file.tar.gz
- tool
- curl21 commands
More curl commands
-
curl -s -u user:password https://api.example.com/endpoint | jq .Send an HTTP request with a username and password (Basic Authentication).
-
curl -so /dev/null -w '%{http_code}' https://example.comPrint just the response status code. Handy in scripts.
-
curl -X POST https://api.example.com/v1/items -H 'Content-Type: application/json' -d '{"name":"foo"}'Send a JSON payload in a POST request.
-
curl -H 'Authorization: Bearer $TOKEN' https://api.example.com/meSend a JWT or Bearer token in the Authorization header.
-
curl -Lv --max-redirs 5 https://example.comFollow up to 5 redirects and show every request and response in detail.