This is my ajax request call
$.ajax({
url: '/refresh',
type: 'GET',
contentType: "application/json",
data: {
Name: $("#inputName").val(),
Url: $("#inputUrl").val()
},
success: function(data) {
console.log('form submitted.' + data);
}
});
This is the GET route in nodejs
app.get('/refresh', function(req, res) {
console.log("My data" + JSON.stringify(req.body));
//other operations
}
How can i get the data which is passed from ajax call in my js?? Please help!! Thanks a lot!