在moco框架文件夹下,新定义一个JSON文件命名为postJson.json
[
{
"description":"不含参数的post请求",
"request":{
"uri":"/post",
"method":"post"
},
"response":{
"text":"不含参数的post请求"
}
}
]
启动moco : java -jar moco-runner-0.12.0-standalone.jar http -p 12306 -c postJson.json
在接口测试工具如JMeter、Postman里输入url,得到响应结果