I am working in a Node.js RESTful API project with Express framework.
Every response of APIs has to include the "status" field in the response body, also in the header.
I think that I may have to use a middleware(Express Middleware) to achieve this goal, not containing the "status" by:
res.send({status:200, ...})
Even I found a question:Connect or Express middleware to modify the response.body but it is to add a normal data.
But I am not sure if there is a middleware to add a specific field to the response body from catching the specific field in the field, the after processing the api requests.
I need your help. Thanks!