I have this problem with the request:
$.ajax({ type: "POST", url: ajaxUrl, dataType : "json", contentType: "application/json", data: JSON.stringify(data), success: function (data) { ... } });
Confirm the title in the request:
Accept application/json, text/javascript, */*; q=0.01
The response status is 200, but a browser detection error and rejection of a successful call
Fixed deleting dataType: "json":
$.ajax({ type: "POST", url: ajaxUrl, contentType: "application/json", ...
The only difference that accepts the header request in the request has changed to:
Accept */*
But now the success callback is called.
source share