I'm using res.send
and no matter what, it returns status of 200. I want to set that status to different numbers for different responses (Error, etc)
This is using express
I'm using res.send
and no matter what, it returns status of 200. I want to set that status to different numbers for different responses (Error, etc)
This is using express
In the documentation of express (4.x) the res.sendStatus is used to send status code definitions. As it is mentioned here each has a specific description.
i use this with express
and this without express (normal http server)