1. Para que serve
curl é o padrão de fato para testar APIs, webhooks, health-checks e downloads em qualquer servidor Linux/macOS (e no Windows moderno).
2. Leituras básicas
curl -I https://irndevs.com
curl -v https://httpbin.org/get
curl -s https://httpbin.org/get | head
-Isó headers (HEAD)-vverbose (TLS, redirects, headers)-ssilencioso (sem barra de progresso)
3. POST JSON e autenticação
curl -X POST https://httpbin.org/post \
-H "Content-Type: application/json" \
-H "Authorization: Bearer SEU_TOKEN" \
-d '{"nome":"IRN","ok":true}'
4. Download e redirects
curl -L -o app.zip https://exemplo.com/app.zip
curl -O https://exemplo.com/arquivo.tgz
5. Medir latência (smoke test)
curl -o /dev/null -s -w "http_code=%{http_code} time_total=%{time_total}\n" \
https://irndevs.com
6. Flags de segurança e timeout
curl --connect-timeout 5 --max-time 30 https://api.exemplo.com/health
# -k ignora TLS — SOMENTE debug local
DICA Salve requests críticos em scripts no repo de ops e rode no CI após deploy.