I have a express app where I set the status code before calling res.json() like this:
res.status(number).json(obj);
The problem now is that my json can be just a number and therefor this library will set the statuscode of the response to the number specified in the json method and the actual json to undefined. I think setting a number as return value in json should be fine...
Since setting the status code in the json method is deprecated in express are there any plans to migrate to the newer version of the function? What is your opinion on this?
I have a express app where I set the status code before calling res.json() like this:
res.status(number).json(obj);
The problem now is that my json can be just a number and therefor this library will set the statuscode of the response to the
number
specified in the json method and the actual json toundefined
. I think setting a number as return value in json should be fine...Since setting the status code in the json method is deprecated in express are there any plans to migrate to the newer version of the function? What is your opinion on this?