Closed Phalguna2125 closed 3 years ago
@Phalguna2125 yes! you can use the response
key(not responses
with an "s").
export default {
path: '/people',
methods: ['GET', 'POST', 'PUT'],
response: (req, res) => {
return res.json(/* something based on the req object */)
}
}
The only downside to this is you don't have have a mock response in the headlamp UI if you don't also fill out the responses
.
I have to modify the response based on query params but the response is giving back the same for different query param/different files. Is this possible?