3 ms·
I saw a similar curl post last week and was inspired to add this to my ~/.bashrc for basic timing and headers info: wwwinfo() { printf "##\n# PAGE INFO\n
by tombrossman 7y ago
I saw a similar curl post last week and was inspired to add this to my ~/.bashrc for basic timing and headers info:
wwwinfo()
{
printf "##\n# PAGE INFO\n##\n"
curl \
--silent \
--output /dev/null \
--user-agent 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36' \
--write-out \
" Remote IP: %{remote_ip}
Port: %{remote_port}
Name Lookup: %{time_namelookup}s
Connect Time: %{time_connect}s
TLS Handshake: %{time_appconnect}s
Total Time: %{time_total}s
Down Speed: %{speed_download}B/s\n" \
"$1" &&\
printf "##\n# HEADERS\n##\n"
curl --head "$1"
}
(It spoofs Chrome latest + Windows 10 user-agent, but this is optional.)