curl返回状态码

curl -I -o /dev/null -s -w %{http_code} www.baidu.com

参考:
http://events.jianshu.io/p/c286f9c25c94
http://beerpla.net/2010/06/10/how-to-display-just-the-http-response-code-in-cli-curl

posted @ 2021-08-06 18:04  没有猫的猫奴  阅读(184)  评论(0)    收藏  举报