[
{
"description":"不支持注释,可以在description中注释",
"request":{
"uri":"/demo"
},
"response":{
"text":"这是一个moco框架demo"
}
}
{
"description":"约定请求的参数,method为方法",
"request":{
"method":"get"
"version":"HTTP/1.0" //规定
"content-type":"application/json" //设置头部
"uri":"/demo" //具体request接口
"uri":{
"match":"/\\w*/foo" //request的uri必须与正则表达式匹配,才能匹配此接口
"startwith":"/foo" //必须以这个接口开始
"endwith":"foo" //必须以这个接口结束
"contain":"foo" //必须包含这个接口
}
"queries":{
"param":"request param"
}
},
"response":{
"text":"success"
}
}
]