Авторизация Bearer токеном curl
Передать JWT/Bearer токен в заголовке Authorization
curl -H 'Authorization: Bearer $TOKEN' https://api.example.com/me
more curl
all 21 commands →
Следовать редиректам подробно
curl -Lv --max-redirs 5 https://example.com
Сохранить ответ в файл
curl -sSL -o /tmp/result.json https://api.example.com/data
Время до первого байта
curl -o /dev/null -sS -w 'ttfb: %{time_starttransfer}s\ntotal: %{time_total}s\n' https://example.com
Только заголовки ответа
curl -sI https://example.com
Загрузить файл multipart
curl -F 'file=@./report.pdf' -F 'user=alice' https://upload.example.com/api