防火墙
接口
curl
curl https://www.baidu.com
基本用法,向接口发起Get请求。
curl -X POST
'https://www.baidu.com'
-H 'cache-control: no-cache'
-H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW'
-F name=uusama
-F like=fruit
-X POST 指定请求方式为POST请求
-H 指定请求头部
-F 指定请求参数
curl -o /dev/null -s -w time_namelookup:"\t"%{time_namelookup}"\n"time_connect:"\t\t"%{time_connect}"\n"time_appconnect:"\t"%{time_appconnect}"\n"time_pretransfer:"\t"%{time_pretransfer}"\n"time_starttransfer:"\t"%{time_starttransfer}"\n"time_total:"\t\t"%{time_total}"\n"time_redirect:"\t\t"%{time_redirect}"\n" https://www.baidu.com
-w:将请求结果输入到文件而不是标准输出
-o:请求完成后使用自定义格式输出
-s:静默模式(不要输出任何东西)
time_namelookup:DNS解析域名时间,把域名—>ipd的时间
time_connect:TCP连接的时间,三次握手的时间
time_appconnect:SSL|SSH等上层连接建立的时间
time_pretransfer:从请求开始到到响应开始传输的时间
time_redirect:从开始到最后一个请求事务的时间
time_starttransfer:从请求开始到第一个字节将要传输的时间
time_total:总时间