Skip to main content
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link
URL Rewriter Bot
URL Rewriter Bot

Try using the beforeSend property instead of xhrFields. In your case:

var ajaxOptions = { url: serviceResourceUrl, type: "get", dataType: "json", success: successCallback, error: failedCallback, beforeSend: function(xhr){ xhr.withCredentials = true; } }; $.ajax(ajaxOptions); 

You can learn more here: Sending credentials with cross-domain posts?Sending credentials with cross-domain posts?

Try using the beforeSend property instead of xhrFields. In your case:

var ajaxOptions = { url: serviceResourceUrl, type: "get", dataType: "json", success: successCallback, error: failedCallback, beforeSend: function(xhr){ xhr.withCredentials = true; } }; $.ajax(ajaxOptions); 

You can learn more here: Sending credentials with cross-domain posts?

Try using the beforeSend property instead of xhrFields. In your case:

var ajaxOptions = { url: serviceResourceUrl, type: "get", dataType: "json", success: successCallback, error: failedCallback, beforeSend: function(xhr){ xhr.withCredentials = true; } }; $.ajax(ajaxOptions); 

You can learn more here: Sending credentials with cross-domain posts?

Source Link
monsur
  • 48.3k
  • 19
  • 104
  • 96

Try using the beforeSend property instead of xhrFields. In your case:

var ajaxOptions = { url: serviceResourceUrl, type: "get", dataType: "json", success: successCallback, error: failedCallback, beforeSend: function(xhr){ xhr.withCredentials = true; } }; $.ajax(ajaxOptions); 

You can learn more here: Sending credentials with cross-domain posts?