-
-
Save finas/3c21459930572ca43cdbfa59d7f059c8 to your computer and use it in GitHub Desktop.
[curl] #linux #curl #network
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
# 使用指定的 Host 访问某个地址 | |
curl -w "@curl_format.txt" -H 'Host: www.baidu.com' 'http://127.0.0.1' | |
# 用于分析请求耗时 | |
curl -w "@curl_format.txt" 'http://127.0.0.1' | |
# 设置超时 | |
curl --connect-timeout 1 --max-time 3 "http://www.baidu.com" | |
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
time_namelookup: %{time_namelookup}\n | |
time_connect: %{time_connect}\n | |
time_appconnect: %{time_appconnect}\n | |
time_redirect: %{time_redirect}\n | |
time_pretransfer: %{time_pretransfer}\n | |
time_starttransfer: %{time_starttransfer}\n | |
----------\n | |
time_total: %{time_total}\n |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment