常用命令
常用命令
curl -sS -i https://api.example.com/v1/users/1
curl -sS -X POST https://api.example.com/v1/users \
-H 'Content-Type: application/json' \
-d '{"name":"alice"}'
curl -sS -o /dev/null -w 'code=%{http_code} time=%{time_total}\n' \
https://api.example.com/healthz-w 可输出 time_namelookup、time_connect、time_starttransfer 等变量,用于快速分解耗时。