Closed StoyanKostov closed 7 years ago
Hello @StoyanKostov, thanks for this report. You are right "params" is reserved for path params. Could be possible to provide the data in a wrapped object like:
{
"body": {},
"params": {},
"query": {},
"faker": {},
...
}
Best
Fix was published as 0.19.0-alpha.
Run npm install node-mock-server@0.19.0-alpha
and change your getId function:
....
getId: function ( params ) {
return body.params.application;
}
....
Hello,
I have a POST request with a body like:
My response should be something like:
My getId function is:
It seems to me that "params" is a reserved word for GET url parameters. So "params" has a value of empty object {} in getId function. How can I access "application" value in getId?
Best regards!