I'm trying to make a POST request to my node JS server, I tried with Postman and it's works fine but when I use AJAX I got an empty data in the server, I tried to use contentType: "application/json" but I got this error enter image description here
this is AJAX code :
$.ajax({
type: "POST",
contentType: "application/json",
url: "http://localhost:3000/comment",
data: {
"email": "admin@gmail.com",
"contenu": "Hello",
"id_article": 1653817160
},
success: function (data2) {
console.log(data2)
}
})