`
隐形的翅膀
  • 浏览: 483555 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

cur发送json字符串, post 请求

 
阅读更多


登陆
curl -l -H "Content-type: application/json" -X POST -d '{"timestamp":1451407267137,"osVersion":"4.4.4","platformType":"android","command":800104,"softwareVersion":24,"app_id":"wenfengpos","object":{"passwd":"EE1F525A7A6E6C782C285956FBCFCD69","deviceToken":"","loginName":"18360903595","roleId":"1"},"access_token":"2f5080d87626084dd12fd582d150a485","mobileType":"1107","deviceId":"android"}' http://test.www.com


刷卡

curl -l -H "Content-type: application/json" -X POST -d '{"command": "807011","timestamp":1451407267137,"osVersion":"4.4.4","platformType":"android","softwareVersion":24,"app_id":"wenfengpos","access_token":"2f5080d87626084dd12fd582d150a485","mobileType":"1107","deviceId":"android","object": {"customerId": "6bc099fd3ecc448e95740640f3b72824","shopId": "934b861f2f2c4bc783c458cd2c177aa4","orderFee":"0.01","authCode":"130450724991540544","mch_id":"5132200001","dataSrc":"wechatNo"}}' http://test.www.com


查询
curl -l -H "Content-type: application/json" -X POST -d '{"command":"807015","timestamp":1451528913054,"object":{"orderFee":"3520.00","orderId":"1020201512311102566568715643","mch_id":"5132200001","waitingTime":"130","dataSrc":"wechatNo"},"deviceId":"witonpay-client-windows","osVersion":"7.1","softwareVersion":"1.6.5.2","platformType":"windows","mobileType":"PC","app_id":"wenfengpos","access_token":"c7d433d67779fe91911cbfe180087f93"}' http://test.www.com
分享到:
评论
1 楼 df270464278 2018-01-22  
请问博主有遇到中文乱码的问题吗?就是json字符串里面包含中文,导致请求服务器接口成乱码,使用curl -H "Content-Type:application/json;charset=UTF-8"并没有解决问题.

相关推荐

Global site tag (gtag.js) - Google Analytics