Created
October 3, 2018 00:08
-
-
Save imvaskii/f3755043348cf9f7ad1960afe1eff325 to your computer and use it in GitHub Desktop.
Curl request to healthcheck web url
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
# Does health check of an article | |
# curl request to the TEST_URL | |
# | |
# Returns the exit code | |
function article_health_check() { | |
response=$(curl -sL -w "%{http_code}" ${TEST_URL} -o /dev/null) | |
if [ $response -eq 200 ]; then | |
return 0 | |
else | |
return 1 | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment