查看源码
curl www.sina.com.cn
下载文件
curl -O www.sina.com.cn/index.php
curl -o index.html www.sina.com.cn/index.php
自动跳转
curl -L www.sina.com.cn
显示响应头
curl -i www.sina.com.cn
curl -I www.sina.com.cn
显示通信信息
curl -v www.sina.com.cn
curl --trace output.txt www.sina.com.cn
curl --trace-ascii output.txt www.sina.com.cn
请求头
curl -H 'Authorization: Bearer requesttoprivateapiwithtoken'
特定请求头
curl -D sugarcookies www.sina.com.cn
curl -b sugarcookies www.sina.com.cn
curl --referer www.example.com www.example.com
curl --user-agent www.sina.com.cn www.sina.com.cn
代理
curl -x proxysever.test.com:3128 www.sina.com.cn
表单提交
curl www.sina.com.cn/form.cgi?data=xxx
curl -X POST --data "data=xxx" www.sina.com.cn/form.cgi
curl -X POST --data-urlencode "date=April 1" www.sina.com.cn/form.cgi
curl --form "fileupload=@filename.txt" www.sina.com.cn