Created
November 16, 2014 00:45
-
-
Save benkant/818592db681a8e741f55 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
$.ajaxPrefilter( function( options ) { | |
if ( options.crossDomain ) { | |
var newData = {}; | |
newData.data = $.extend({}, options.data); | |
newData.url = options.url; | |
options = {}; | |
options.url = "http://www.baskettrack.co/proxy.php"; | |
options.data = $.param(newData); | |
options.crossDomain = false; | |
} | |
}); | |
$.ajax({ | |
url: 'http://54.66.223.236/points/3', | |
data: { }, | |
crossDomain: true, | |
processData: false | |
}).success(function(data) { | |
var jsonData = JSON.parse(data); | |
console.log(jsonData); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment