Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • As for me, I can see from the manual how to get the HTTP status code, but the option -w does not work. I have reported the bug to Apple. Commented May 4, 2015 at 17:51
  • 76
    The -i flag, as in curl -i https://www.example.com/, is probably what you want, as per superuser.com/a/514798/190188
    – caw
    Commented Mar 13, 2017 at 3:10
  • Why not just something like curl -IL http://www.example.com | grep "^HTTP\/" ?
    – St3an
    Commented Feb 18, 2019 at 7:46
  • 11
    Not to future self: the answer you want is probably Cyril David's (currently in 4th position) Commented Jun 17, 2019 at 18:08