关于基于http的嵌入式linux与服务器的get,post解析理解
2019-07-12 14:34发布
生成海报
Get方法
文档规定:
嵌入式 要发送的 get请求:
192.168.1.207:8080/Rice_ssm/shopping/myshopping.action?userId=57&account=13266574728&password=123456789
返回数据:{"msg":"true","items":[{"product":{"name":"湖北大米","pic":"http://pic.58pic.com/58pic/13/82/12/13x58PICbjY_1024.jpg","genre":"食品"},"id":425,"userId":57,"productId":2,"equipmentId":1421,"productCount":1,"productPrice":6.25,"productRoughness":1,"total":6.25,"status":0},{"product":{"name":"湖北大米","pic":"http://pic.58pic.com/58pic/13/82/12/13x58PICbjY_1024.jpg","genre":"食品"},"id":424,"userId":57,"productId":2,"equipmentId":1421,"productCount":1,"productPrice":6.25,"productRoughness":1,"total":6.25,"status":0}]}
Post方法
文档规定
post请求:192.168.1.207:8080/Rice_ssm/shopping/update.action?json={"id"=2,"productCount"=8,"productPrice"=15.1,"total"=54}
返回数据:{"msg":"true","items":"更新成功"}
打开微信“扫一扫”,打开网页后点击屏幕右上角分享按钮