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
(as mentioned in the comments already)
The manual states:
The body parameter can be a Buffer object, a String, an object, or an Array.
So integers aren't directly supported and need to be converted to one of those types first. For instance:
response.send(String(idTest));