http请求工具详解
curl使用方法
参数
说明
例子
-A
设置user-agent
curl -A “Chrome” http://www.baidu.com
-X
用执行方法请求
curl -X POST http://httpbin.org/post
-I
只返回请求的头信息
-d a=1 -d b=2 -d c=3-d “a=1&b=2&c=3”-d @filename
-O
下载文件并以远程文件名保存
-o
下载文件并以指定文件名保存
curl -o fox.png http://bin.org/image/png
-L
跟随重定向请求
curl -IL https://baidu.com
-H
设置头信息
curl -o image.webp -H “accept:image/webp” http://httpbin.org/image
-k
允许发起不安全的ssl请求
-b
设置cookies
curl -b a=hello http://httpbin.org/cookies
wget使用方法
参数
说明
例子
...




