Last active
October 29, 2019 20:19
-
-
Save sathed/9181b58da963207a374f2fd370f0a703 to your computer and use it in GitHub Desktop.
Use curl to retrieve only the status code.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# For CA certs. | |
curl -so /dev/null -w "%{http_code}" https://google.com/ | |
# For self-signed certs: | |
curl --insecure -so /dev/null -w "%{http_code}" https://somesite.com/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment