Created
June 9, 2021 11:23
-
-
Save zelic91/78d7bb90a63a7f30f3064e978caf6e38 to your computer and use it in GitHub Desktop.
CURL with various time info
This file contains hidden or 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
curl_time() { | |
curl -so /dev/null -w "\ | |
namelookup: %{time_namelookup}s\n\ | |
connect: %{time_connect}s\n\ | |
appconnect: %{time_appconnect}s\n\ | |
pretransfer: %{time_pretransfer}s\n\ | |
redirect: %{time_redirect}s\n\ | |
starttransfer: %{time_starttransfer}s\n\ | |
-------------------------\n\ | |
total: %{time_total}s\n" "$@" | |
} | |
curl_time -X POST -H "Content-Type: application/json" -d '{"key": "val"}' https://postman-echo.com/post | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment