Command:
$ curl -s -o /dev/null -w "%{http_code}" https://en.wikipedia.org/wiki/Ichiro_Suzuki
Result:
200
Command:
$ curl -s -o /dev/null -w "%{http_code}" https://en.wikipedia.org/wiki/Ichiro_Suzuk
Result:
404
Saturday, September 29, 2018
Friday, September 28, 2018
cURL: Getting HTTP Status Codes from the Command Line
Command:
$ curl -I https://ja.wikipedia.org/wiki/天賞
Result:
HTTP/1.1 404 Not Found
Date: Fri, 28 Sep 2018 08:14:21 GMT
Content-Type: text/html; charset=UTF-8
$ curl -I https://ja.wikipedia.org/wiki/天賞
Result:
HTTP/1.1 404 Not Found
Date: Fri, 28 Sep 2018 08:14:21 GMT
Content-Type: text/html; charset=UTF-8
...
Tuesday, September 25, 2018
Monday, September 24, 2018
Subscribe to:
Comments (Atom)





