1) I'm trying to use a crossdomain api provided by netrunnerdb.com. The site requires a jsonp request or denies the request.
If you'd like more information on the api visit the website, there's a link for the api at the bottom of the page.
2) It's not my api that I'm calling
-- I have no control over the server, and I think the problem is that the json isn't being returned within the function that jquery sends as the callback.
3) My Ajax request:
var path="http://netrunnerdb.com/api/search/r<t d:c"
$.ajax({
type: "GET",
url: path,
cache: true,
dataType: "jsonp",
error: function(xhr, ajaxOptions, thrownError) {
alert(xhr.status);
alert(ajaxOptions);
alert(thrownError);
},
});
Here is the URL sent by the request:
http://netrunnerdb.com/api/search/r%3Ct%20d:c%20?callback=jQuery1110010968961869366467_1390750866847
4) The Response:
I get an error 200 thrown, I receive a parseerror, and then am informed that the json callback wasn't called. Is the response just malformed? Is there a workaround? In chrome if I copy the whole response by browsing directly to the above URL into the console and set a variable equal to it, it parses just fine into an array.