Created
February 27, 2023 14:58
-
-
Save rjchicago/29c2cb4a1dfe796c676b458a68381f5c to your computer and use it in GitHub Desktop.
Test Endpoint
This file contains 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
# create alias | |
test() { | |
local URL=${1:?URL is required as first argument} | |
local TIMEOUT=${TIMEOUT:-1} | |
local SLEEP=${SLEEP:-1} | |
while true; do curl -s -m $TIMEOUT $URL > /dev/null && echo -n ✅ || echo -n 💀; sleep $SLEEP; done | |
} | |
# usage | |
test my.example.asd/health | |
SLEEP=.1 TIMEOUT=.3 test my.example.asd/health |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment