使用 curl命令 模拟json格式的POST请求
curl 命令如下:
curl -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{"phone": "18000011005","password": "xxxxx", "status":40,"order_no":"1998708","config":{"loading":true},"data": "123", "appVersion": "1.2.3","CHEN_ZHE_TEST_ONE_TWO_THREE": 1}' http://192.168.57.80/mjyx-mall-gateway2/web/index.php/auth/login
设置POST Header
-H "Accept: application/json" -H "Content-type: application/json" -X POST -d
请求参数 parames
'{"phone": "18000011005","password": "xxxxx", "status":4,"order_no":"1998708","config":{"loading":true},"data": "123", "appVersion": "1.2.3","CHEN_ZHE_TEST_ONE_TWO_THREE": 1}'
请求路径 URL
http://192.168.57.80/gateway/login
使用curl 命令拼接这三个参数,就可以打印出请求结果
作者:HowieDev
链接:https://www.jianshu.com/p/d51c0ae5f92d
来源:简书
简书著作权归作者所有,任何形式的转载都请联系作者获得授权并注明出处。
更多推荐
所有评论(0)