Hi, I have created a test app on JSBin in order to test requests to the API but i all i receive is an Access-Control-Allow-Origin alert. How can I allow my app to connect successfully to the API ?
Here is my request : xhr.open("GET", "https://api.themoviedb.org/3/movie/550?api_key=[key]");
Here is the alert : XMLHttpRequest cannot load https://api.themoviedb.org/3/movie/550?api_key=[key]. Cannot use wildcard in Access-Control-Allow-Origin when credentials flag is true.
Thank you.
.לא מצאת סרט או סדרה? היכנס כדי ליצור אותם
?רוצה לדרג או להוסיף פריט אל רשימה
?לא חבר אתר
תגובה מאת Travis Bell
ב-נובמבר 21, 2016 ב-1:16אחרי חצות יום
Hi @tocausan
You need to use JSONP with a callback. Here's a jQuery example (just make sure to swap out your API key).
תגובה מאת tocausan
ב-נובמבר 22, 2016 ב-4:18לפני חצות יום
Thanks a lot !