We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2ee4456 commit b89c1daCopy full SHA for b89c1da
examples/docker/run_python.sh
@@ -42,11 +42,13 @@ function cleanURL() {
42
}
43
44
function validateURL() {
45
- match=$(curl "${ping_url}/ping" -H "X-RosetteAPI-Key: ${API_KEY}" -H "user_key: ${API_KEY}" | grep -o "Rosette API")
46
- if [ "${match}" = "" ]; then
47
- echo -e "\n${ping_url} server not responding\n"
+ output_file=validate_url_out.log
+ http_status_code=$(curl -s -o "${output_file}" -w "%{http_code}" -H "X-RosetteAPI-Key: ${API_KEY}" "${ping_url}/ping")
+ if [ "${http_status_code}" != "200" ]; then
48
+ echo -e "\n${ping_url} server not responding. Output is:\n"
49
+ cat "${output_file}"
50
exit 1
- fi
51
+ fi
52
53
54
function runExample() {
0 commit comments