Skip to content

Instantly share code, notes, and snippets.

@imvaskii
Created October 3, 2018 00:08
Show Gist options
  • Save imvaskii/f3755043348cf9f7ad1960afe1eff325 to your computer and use it in GitHub Desktop.
Save imvaskii/f3755043348cf9f7ad1960afe1eff325 to your computer and use it in GitHub Desktop.
Curl request to healthcheck web url
# 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