Returning the HTTP code of a HTTP request

Posted on Tue 05 February 2013 in misc

This is really useful for returning HTTP code of a request.

curl --write-out "%{http_code}\n" --silent --output /dev/null www.example.com