curl command show http status code in response (#Linux #Shell)

curl -s --head http://example.com | grep HTTP
HTTP/1.1 200 OK

curl -s --head -X POST https://yahoo.com | grep HTTP
HTTP/2 301

Original by Github issue

https://github.com/YumaInaura/YumaInaura/issues/2983

Recommended Posts

curl command show http status code in response (#Linux #Shell)
Check the HTTP status code response with the curl command (#Linux #Shell)
Linux [shell command]
Code block when writing console (shell) command execution in Qiita
[Infrastructure] Linux command, shell script collection
Run shell command / python in R
Linux command (basic in basic) personal memo
Shell command to visualize line feed code