Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
batch script to check timeout using curl
echo off
set arg1=%1
set arg2=%2
..\mingw64\bin\curl -o /dev/null -s -w %%{time_total} %arg1% > ..\tmp\rtime2.txt
set /p VAR=<..\tmp\rtime2.txt
del ..\tmp\rtime2.txt
IF %VAR% GEQ %arg2% (
echo Response time alto! %VAR%, expected %arg2%
echo { "state":"failure", "data":%VAR% }
) ELSE (
echo Response time bajo! %VAR%, expected %arg2%
echo { "state":"success", "data":%VAR% }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.