How can I capture the response time from a CURL request?
curl https://www.google.com
Invoke curl.exe from a command window (in Windows, click Start > Run and then enter "cmd" in the Run dialog box). You can enter curl --help to see a list of cURL commands.
To make a GET request using Curl, run the curl command followed by the target URL. Curl automatically selects the HTTP GET request method unless you use the -X, --request, or -d command-line option.
I found this approach in an article that returns a value in seconds
curl -o /dev/null -s -w %{time_total}\\n https://www.google.com
It outputs something like:
0.059
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With