curl命令总结

curl常用命令
http://www.cnblogs.com/gbyukg/p/3326825.html

curl命令后面的网址需要用双引号括起来,原因:防止有特殊字符 &号就是特殊字符

curl命令加网址需要

测试post
curl -X POST -H "Content-Type: application/json" -d '{"appid":"0001","sign":"rgcs","token":"xdwCEAKRjU1dlnNh6Y0MMHZP4C++ICjEaBTI9fUzeA8=","serialNumber":"1234942578888"}' "http://localhost:8081/service/api/picture/upload?access_token=46A809D10E434257864390619869BC58&group_id=111"

测试文件上传
curl -F "[email protected]" -F "name=gcy" "http://localhost:8081/service/api/picture/upload?access_token=46A809D10E434257864390619869BC58"

测试delete
curl -X DELETE -H "content-type: application/json" https://url:port/service/api/group/999/?access_token=B3717760341F4F3C9EC207B65B43C637

测试get
curl -X GET -H "content-type: application/json" "http://url:port/service/api/plan/plan_locations?group_id=30&access_token=5966BDD452544D35A52943DCE9C7666E"

你可能感兴趣的:(curl命令总结)