发送请求,默认get方式
curl "url" //网页或json,string会打印到标准输出中,-o 参数可以制定输出位置上传文件
curl -u name:password -T filePath ftp://serverName使用代理
curl -x server:port url保存cookie
curl -c cookie.txt url curl -D cookie.txrt url //保存header里的信息使用cookie
curl -b cookie.txt url模拟浏览器
curl -A "Mozilla/4.0(compatible; MSIE 8.0; Windows NT 5.0)" url伪造referer
curl -e "www.baidu.com" url //会误以为从百度跳转过来的请求下载文件
curl -o tieba1.jpg http:www.baidu.com/tieba1.JPG curl -O http://www.baidu.com/tieba1.JPG curl -O http://www.baidu.com/tieba[1-5].JPG //循环下载通过ftp下载
curl -O -u name:password ftp://server显示错误
curl -f url指定post方式请求
curl url -X POST -d "name=user&age=18" curl url -X POST -d {"name":"user","age:18"}