I am trying to delete a certain input from my database. I cant seem to get the data to come through on an app.delete to know which entry to delete. However app.post gets the data. Here is my code
Client:
let userToDelete = {
data:entryToDelete
}
httpRequest.delete(url, userToDelete)
.then(function (response) {
//...
Server
app.delete('/api/deleteEntry', function(req, res){
console.log('going to delete', req.body);
//...
});
now if I change to httpRequest.post and app.post, req.body console logs the data I send. Does a .delete request not get the data?