dreamhead / moco

Easy Setup Stub Server
MIT License
4.36k stars 1.08k forks source link

moco 能做到 通过第三方返回的json来判定response是什么么 on可以做到么 #199

Open q2qiang opened 7 years ago

dreamhead commented 7 years ago

Could you please give me more details about your scenario?

q2qiang commented 7 years ago

比如说,我现在有一个登录接口,但是这个登录接口依赖一个验证码接口,验证码接口返回success就登录成功,返回failed 就登录失败,可以用on实现这个功能么

dreamhead commented 7 years ago

If you want to integrate a third party interface, try proxy

The better option is to use Moco as verfication code stub to return what you need.

q2qiang commented 7 years ago

if want get a complex json ,for example {"a":{"c":"1"},"b":{"d":"2"}} ,how to do

dreamhead commented 7 years ago

You may need Json Response

q2qiang commented 7 years ago

when i want this cam to be a service , i use this command is not available nohup java -jar moco.jar http -p 12306 -g rule.json -s 9527> ./log/log.txt &