Can I use the jQuery $.ajax() method instead of the provided sample code? For some reason I am attempting this but it is not working:
$(function() {
alert("Hi");
$.ajax({
url: "http://private-174c-themoviedb.apiary.io/3/search/movie?api_key=[pastedMyApiKeyHere]",
contentType: "application/json",
type: "GET",
crossDomain: true,
success: function(data) {
alert("It worked");
},
error: function(err) {
alert(JSON.stringify(err));
}
});
});
Any insight would be greatly appreciated. Thank you!
Can't find a movie or TV show? Login to create it.
Vil du vurdere eller legge til dette elementet i en liste?
Ikke et medlem?
Svar av Travis Bell
den 24 Oktober 2012 kl. 11:25 AM
First, our API doesn't support JSONP without adding a callback param. Try adding it to your quest.
Secondly, remember Apiary is only to be used for testing. Make sure to try that request on the real production end point.
Svar av blaster151
den 25 Oktober 2012 kl. 3:54 PM
That helped - thanks!