I have implemented an Ajax request on my website, and I am calling the endpoint from a webpage. It always returns 200 OK, but jQuery execut
Try following
$.ajax({
type: 'POST',
url: 'Jqueryoperation.aspx?Operation=DeleteRow',
contentType: 'application/json; charset=utf-8',
data: { "Operation" : "DeleteRow",
"TwitterId" : 1 },
dataType: 'json',
cache: false,
success: AjaxSucceeded,
error: AjaxFailed
});
OR
$.ajax({
type: 'POST',
url: 'Jqueryoperation.aspx?Operation=DeleteRow&TwitterId=1',
contentType: 'application/json; charset=utf-8',
dataType: 'json',
cache: false,
success: AjaxSucceeded,
error: AjaxFailed
});
Use double quotes instead of single quotes in JSON object. I think this will solve the issue.