Closed jsumners closed 10 years ago
hmm it has "Access-Control-Allow-Origin: *" header
http://jsfiddle.net/9LEjy/ which is:
$.ajax({
url: "http://www.gw2spidy.com/api/v0.9/json/item-search/the%20jugg",
dataType: "json",
success: function(data, status, jqXHR) {
$("output").html( JSON.stringify(data), null, "\t");
}
});
Results in:
"XMLHttpRequest cannot load http://www.gw2spidy.com/api/v0.9/json/item-search/the%20jugg. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://fiddle.jshell.net' is therefore not allowed access."
the problem is that the framework redirects /item-search/thejugg
to /item-search/thejugg/
and in the redirect process it seems to lose the Access-Control-Allow-Origin header :(
let me see if I can easily fix that
your example now works too, asuming you change $("output")
to $("#output")
;)
Yay for bugs all around!
Glad I wasn't reporting a non-issue and that you were able to solve the problem.
It really should -- http://www.w3.org/TR/cors/