Need some help here can't figure out how to read a JSON file which container the body of a response for any request to my impostor.
This is what I got so far:
```
{
"protocol": "http",
"port": 4542,
"requests": [],
"name": "settings",
"stubs": [
{
"responses": [
{
"inject": "<%- stringify(filename, 'services/settings/response.ejs') %>"
}
]
}
]
}
```
So far so good, and this is how my `response.ejs` file looks like:
```
function (request, state, logger) {
return {
headers: {
'Content-Type': 'application/json'
},
body: ?
};
}
```
The `body: ?` it's the bit I can't figure out I have try to render the file using `ejs` I tried using `fs` module but it's not accessible from there my JSON body response it's on a file on the same path than my `reponse.ejs` `services/settings/body.json`
Any ideas? I just run out of options lol :(
Thanks,
--
You received this message because you are subscribed to the Google Groups "mountebank-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mountebank-discuss+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
--