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?
¿No encuentras una película o serie? Inicia sesión para crearla:
¿Quieres puntuar o añadir este elemento a una lista?
¿No eres miembro?
Contestado por Travis Bell
el 13 de agosto de 2016 a las 11:38
Hi Luke,
I'm not sure. Everything looks fine to me. How are you making the request?
Contestado por luke_simmon
el 13 de agosto de 2016 a las 14:14
Here it is:
Contestado por Travis Bell
el 14 de agosto de 2016 a las 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).
Contestado por luke_simmon
el 14 de agosto de 2016 a las 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.
Contestado por Travis Bell
el 14 de agosto de 2016 a las 13:55
No, it is not necessary. It was accidentally left from a previous example.
Contestado por luke_simmon
el 14 de agosto de 2016 a las 18:53
Cannot GET https://api.themoviedb.org/3/genre/movie/list&api_key=####?callback=jQuery22408132628371243029_1471207855881&_=1471207855884
Contestado por Travis Bell
el 15 de agosto de 2016 a las 00:22
That's not a valid HTTP request. You're looking for:
Contestado por luke_simmon
el 15 de agosto de 2016 a las 16:08
forgive me. I am not seeing a difference between your request and my request
Contestado por Travis Bell
el 15 de agosto de 2016 a las 19: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.
Contestado por luke_simmon
el 16 de agosto de 2016 a las 13:39
thanks for your help. that fixed it