Curl HTTP 调试

几条常见 curl 写法如下。

查看响应头


curl -I https://example.com

打印详细过程


curl -v https://example.com

发送 JSON POST


curl -X POST https://example.com/api \

  -H "Content-Type: application/json" \

  -d '{"name":"test"}'