The Movie Database Support Forum

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!

2 Antworten (Seite 1 von 1)

Jump to last post

First, our API doesn't support JSONP without adding a callback param. Try adding it to your quest.

http://private-174c-themoviedb.apiary.io/3/search/movie?api_key=[pastedMyApiKeyHere]&callback=test

Secondly, remember Apiary is only to be used for testing. Make sure to try that request on the real production end point.

That helped - thanks!

Es fehlt ein Film oder eine Serie? Logge dich ein zum Ergänzen.

Allgemein

s Fokus auf Suchfeld
p Profil öffnen
esc Fenster schließen
? Tastenkürzel anzeigen

Videos

b Zurück
e Bearbeiten

Staffeln

Nächste Staffel
Vorherige Staffel

Episoden

Nächste Episode
Vorherige Episode

Bilder

a Poster oder Hintergrundbild hinzufügen

Editieren

t Sprachauswahl öffnen
ctrl+ s Speichern

Diskussionen

n Neue Diskussion erstellen
w Beobachten an / aus
p Diskussion öffentlich / privat
c Diskussion öffnen / schließen
a Diskussionsverlauf anzeigen
r Auf Diskussion antworten
l Letzte Antwort anzeigen
ctrl+ enter Senden
Nächste Seite
Vorherige Seite

Einstellungen

Diesen Eintrag bewerten oder zu einer Liste hinzufügen?

Anmelden