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 AM
Hi Luke,
I'm not sure. Everything looks fine to me. How are you making the request?
Отговор от luke_simmon
на 13 август 2016 в 2:14 PM
Here it is:
Отговор от Travis Bell
на 14 август 2016 в 11:15 AM
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 AM
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 PM
No, it is not necessary. It was accidentally left from a previous example.
Отговор от luke_simmon
на 14 август 2016 в 6:53 PM
Cannot GET https://api.themoviedb.org/3/genre/movie/list&api_key=####?callback=jQuery22408132628371243029_1471207855881&_=1471207855884
Отговор от Travis Bell
на 15 август 2016 в 12:22 AM
That's not a valid HTTP request. You're looking for:
Отговор от luke_simmon
на 15 август 2016 в 4:08 PM
forgive me. I am not seeing a difference between your request and my request
Отговор от Travis Bell
на 15 август 2016 в 7:26 PM
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 PM
thanks for your help. that fixed it