Curl to return http status code along with the response

后端 未结 12 1134
我在风中等你
我在风中等你 2020-12-04 08:24

I use curl to get http headers to find http status code and also return response. I get the http headers with the command

curl -I http://localhost

12条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-04 08:53

    while : ; do curl -sL -w "%{http_code} %{url_effective}\\n" http://host -o /dev/null; done
    

提交回复
热议问题