(004)Linux http命令curl访问url

curl www.baidu.com  访问一个网页

curl -o tt.html www.baidu.com  将访问www.baidu.com返回的内容写入tt.html

curl -i www.baidu.com  显示响应的头信息

curl -v www.baidu.com  显示一次http请求的通信过程

curl -X GET/PUT/POST/DELETE url  执行GET/PUT/POST/DELETE操作(必须用大写)

curl -I -m 10 -o /dev/null -s -w %{http_code} https://www.baidu.com  只返回状态码

原文地址:https://www.cnblogs.com/javasl/p/11371215.html