I am just making a basic ajax call to 'http://api.themoviedb.org/3/genre/movie/list&api_key=#####' I keep getting a 'Cannot get' error? what am I doing wrong?
.לא מצאת סרט או סדרה? היכנס כדי ליצור אותם
?רוצה לדרג או להוסיף פריט אל רשימה
?לא חבר אתר
תגובה מאת Travis Bell
ב-אוגוסט 13, 2016 ב-11:38לפני חצות יום
Hi Luke,
I'm not sure. Everything looks fine to me. How are you making the request?
תגובה מאת luke_simmon
ב-אוגוסט 13, 2016 ב-2:14אחרי חצות יום
Here it is:
תגובה מאת Travis Bell
ב-אוגוסט 14, 2016 ב-11:15לפני חצות יום
Even though you have your dataType set to jsonp, is is sending along a callback?
This test of mine here is working fine (make sure to replace your API key on line 11).
תגובה מאת luke_simmon
ב-אוגוסט 14, 2016 ב-11:47לפני חצות יום
I am using the api in many other instances, genre has been the only on genre. I see that you added a query at the end, is that necessary? I am trying to get the list of genres to use for the movies gennre codes that I get.
תגובה מאת Travis Bell
ב-אוגוסט 14, 2016 ב-1:55אחרי חצות יום
No, it is not necessary. It was accidentally left from a previous example.
תגובה מאת luke_simmon
ב-אוגוסט 14, 2016 ב-6:53אחרי חצות יום
Cannot GET https://api.themoviedb.org/3/genre/movie/list&api_key=####?callback=jQuery22408132628371243029_1471207855881&_=1471207855884
תגובה מאת Travis Bell
ב-אוגוסט 15, 2016 ב-12:22לפני חצות יום
That's not a valid HTTP request. You're looking for:
תגובה מאת luke_simmon
ב-אוגוסט 15, 2016 ב-4:08אחרי חצות יום
forgive me. I am not seeing a difference between your request and my request
תגובה מאת Travis Bell
ב-אוגוסט 15, 2016 ב-7:26אחרי חצות יום
You're starting your query string with an ampersand. That's not valid HTTP, so it's ignoring your API key param and only reading from the question mark and on. In my example, I fixed that for you.
תגובה מאת luke_simmon
ב-אוגוסט 16, 2016 ב-1:39אחרי חצות יום
thanks for your help. that fixed it