curl post 案例以下:html
1.json
命令格式:curl http://ip:port/product/productDetail/queryProductList -X POST -H "Content-Type:application/json" -d '{"data":{"channelCode":"xm02","productStatus":"2","categoryType":"JY","status":"003000","orgId":"374"}}'cookie
2.app
命令格式:curl http://ip:port/apply/product/matchedRules -X POST -H "Content-Type:application/json" -d '{"loanProductId":"03e2e13bf3074b0ea2e13bf307eb0e75","status":"003000","orgId":"1","sceneCode":"repayType"}'curl
3.攜帶cookie 的get請求post
命令格式:curl http://gammaq-stg.jryzt.com/admin/user/isLogin -b "td_cookie=572606210uuu; usernameall=admin; token=73d08b5c8c7041c094b34b76ba01b879" -vurl
參考連接:http://blog.51cto.com/lookingdream/2087142spa
4.curl發送http請求保存結果到文件.net
命令格式:curl --header "Content-Type:application/json" 'http://hostname:ip/get/path' > /save/to/path/filename.json3d
參考連接:https://blog.csdn.net/bsr1983/article/details/84824621
5.經過GET方法請求 ,訪問百
命令格式: curl protocol://address:port/url
參考連接:https://www.cnblogs.com/alfred0311/p/7988648.html
6.經過代理來訪問
命令格式:curl -x10.18.0.89:1080 http://www.baidu.com/sms/query
參考連接:https://blog.csdn.net/fungleo/article/details/80703365