| 下载 | -O 原名保存 / -o 指定名 |
|---|---|
| 调试 | -I 响应头、-v 详细、-w 状态码 |
| 常用 | -L 跟随重定向、-k 跳过证书校验(仅排障) |
典型用法
典型用法
curl -LO https://example.com/pkg.tar.gz
curl -I https://example.com
curl -s -o /dev/null -w '%{http_code}\n' http://10.0.0.10/health
curl -X POST -H 'Content-Type: application/json' -d '{"k":"v"}' http://10.0.0.10:8080/api接口排障组合:-v 看握手与头、-w 打印耗时字段,快速区分网络慢还是服务慢。