Created
September 30, 2013 18:51
-
-
Save ProdigyView/6768306 to your computer and use it in GitHub Desktop.
Possible example of using Jquery AJAX for CORS in IEfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ieCreateHttpBackend($browser, XHR, $browserDefer, callbacks, rawDocument, locationProtocol, msie, xhr) { | |
if (!msie || msie > 9) return null; | |
return function (method, url, post, callback, headers, timeout, withCredentials) { | |
window.console.log(callback); | |
$.ajax({ | |
url : url, | |
method : method, | |
success: function (respObj) { | |
completeRequest(callback, 200, respObj.responseText, 'Content-Type: ' + respObj.contentType); | |
}, | |
error: function (data) { | |
completeRequest(callback, 500, 'Error', 'Content-Type: text/plain'); | |
}, | |
xhrFields : { | |
withCredentials : true | |
}, | |
data : post | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment