One thought on “Printing the HTTP status code in curl

  1. If you don't mind the extra output, you can make a `HEAD` request with the `-I` flag:$ curl -I 200 OKDate: Wed, 30 Jul 2014 00:16:24 GMTExpires: -1Cache-Control: private, max-age=0Content-Type: text/html; charset=ISO-8859-1Set-Cookie: PREF=ID=96058df09db9116e:FF=0:TM=1406679384:LM=1406679384:S=GOtsYK2SjRJbWOm9; expires=Fri, 29-Jul-2016 00:16:24 GMT; path=/; NID=67=WGFiJdtB0dcBEjbSqkodeaXkwm2aUcWocmXh6zw2fy5oBuk8a_eiS4YucOmXmKGJf2QHj1pjNjkygtWVybpt3sAM5KbOSkKDZrJjUfa2dAm_j_H9T5LTuIsMFpL2Duv-; expires=Thu, 29-Jan-2015 00:16:24 GMT; path=/;; HttpOnlyP3P: CP=\”This is not a P3P policy! See for more info.\”Server: gwsX-XSS-Protection: 1; mode=blockX-Frame-Options: SAMEORIGINAlternate-Protocol: 80:quicTransfer-Encoding: chunked

Comments are closed.