首页 > Web开发 > 详细

curl and wget

时间:2019-06-19 16:10:11      阅读:100      评论:0      收藏:0      [点我收藏+]

1. curl 

-s silent   -v 详细输出   -L  302 追踪

-w  自定义输出格式  如 

 -w %{http_code}   curl -o /dev/null -s -w "time_connect: %{time_connect}\ntime_starttransfer: %{time_starttransfer}\ntime_total: %{time_total}\n

-x 代理

-I 只输出请求header , -i  include  请求内容和  header

-A  自定义user-agent

curl -A "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"

-H  自定义header

默认请求内容输出到屏幕 , -o 输出重定向, 可以直接请求https

-d POST 请求发送 json 数据, 如

curl -H "Content-type:Application/json" -d ‘{"hostname": "CNC-WV-b-D40", "result": {"hostname": "hostname", "network": [{"DEVICE": "bond0", "IPADDR": "1.1.1.1"}, {"DEVICE": "bond1", "IPADDR": "10.11.100.32"}], "service_tag": "060580bD40"}}‘  "url"

 

技术分享图片

 

https 访问加代理方式  --resolv blog.csdn.net:443:47.95.47.253

 

curl and wget

原文:https://www.cnblogs.com/brucewhite/p/11051643.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!