dreamhead / moco

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

Response map to local file #297

Closed wuzhenli closed 2 years ago

wuzhenli commented 3 years ago

In configuration file , I need to write a lot of json text as respons.

  {
     "request" :
       {
        "method" : "get",
        "uri" : "/get"
       },
     "response" :
       {
        "text" : "{\"key1\":\"value1\",\"key2\":\"value2\" ...... }"
       }
  }
]

It's very inconvenient. How use local json file as response?

dreamhead commented 3 years ago

What you need is the file api.

https://github.com/dreamhead/moco/blob/master/moco-doc/apis.md#content-1