Hi,
The default Http Code returned is 201 (Created) for the POST method, and 200 (OK) for all other methods. I want to globally modify the default Http Code returned for a specific method (for example, Delete). How can I do that?
I tried writing this in main.ts:
app.use((req, res, next) => {
if (req.method === 'DELETE') res.status(204);
next();
});
But it doesn't work... and no matter how much I search, I can't find a solution...
Is it even possible?
Thank you!