| 常用 | -i/-I/-v/-o/-w |
|---|---|
| 代理 | -x http://127.0.0.1:8080 |
| 超时 | --max-time/--connect-timeout |
| 重定向 | -L 显式开启并记录跳转链 |
验证示例
验证示例
curl -isS https://example.com/ | head -40
curl -o /dev/null -s -w '%{http_code} %{time_total}s\n' https://example.com/
curl -x http://127.0.0.1:8080 -isS https://app.example.com/api/me -H 'Authorization: Bearer test-token'命令中的测试 token 用占位符记录:真实值通过环境变量传入,避免入历史。