I am trying to send an integer via response.send() but I keep getting this error
response.send()
express deprecated res.send(status): Use res.sendStatus
I am getting a deprecated warning in node-express typescript project due to res.send(403);
res.send(403);
Solution 1 -
res.sendStatus(403);
Solution 2 -
res.status(403).json( { 'success': false, 'result': 'forbidden' } )