I'm using a ajax request for calling a REST service and I'm using post method to pass parameters. I get the response from the REST service when I pass the parameters in the REST URL, but when I send the parameters through data object I dont get any response. Am I doing anything wrong?
$.ajax({
type: "POST",
url: "myURL?ID=5087&name=hello",
data:{
'id':'5087',
'name':'hello',
},
success: function(msg){
alert('wow' + msg);
}
});
In the above request If i remove the parameters from the URL and keep the data object as it is, I'm not getting any response