curl

二.下载

#以原文件名保存
$curl -O  http://xxxx:8000/test.txt

#以新文件名保存
$curl -o mytest.txt  http://xxxx:8000/test.txt

  

二.post

curl -d '{"name":"test","type":"ttt"}' http://www.test.com/api
curl -d '{"name":"test","type":"ttt"}' -v -X POST -H 'Content-Type:application/json' http://www.test.com/api
curl -d '<?xml version="1.0" encoding="UTF-8" ?><admin><name>adu</name><age>23</age></admin>' -X POST -H 'Content-Type:application/xml' http://localhost:8087/requestParam/testXML

  

 

end

posted @ 2016-04-07 11:22  waterystone  阅读(283)  评论(0编辑  收藏  举报