Curl常规使用命令

1)最快方案:只看响应头 + 状态码

curl -s -o /dev/null -w "%{http_code}\n" -I https://example.com

忽略证书校验

curl -sk -o /dev/null -w "%{http_code}\n" -I https://localhost

带有超时时间

curl -sk --connect-timeout 5 --max-time 10 \
  -o /dev/null -w "%{http_code}\n" -I https://localhost