Page 1 of 1

Accessing APIv2 with Javascript and/or CORS

Posted: Tue Feb 20, 2018 5:46 pm
by matt.lawrence
Is there any way to access the API v2 via Javascript or CORS? I've been searching on this forum and Google and have found very little information on such a venture.

My specific use case requires my API calls to work in a Cordova app, so therefore I'm limited to HTML, CSS, and JS.

Every time I use CORS or pure AJAX I get a cross domain request error, despite CORS being built for cross-domain requests.

I have a full writeup of what I'm trying to accomplish with more technical details on this Reddit thread -

If CORS is not allowed as a way to request info, any alternative methods that would work in a Cordova app would be appreciated. I'm using this project to learn WebAPIs so any specific details you could provide in a possible solution would be very much appreciated.

Re: Accessing APIv2 with Javascript and/or CORS

Posted: Sat Jul 21, 2018 11:28 pm
in javascriptt you get 405 error (Cross-origin resource sharing (CORS)) because you use XMLHttpRequest with a remote domain.
But XMLHttpRequest works with a file on your server, you just have to create a server-side scripting file (like php), on your server, which sends your requests to and which return the tvdb JSON results.

[email protected] -> [email protected] -> [email protected] -> [email protected] -> [email protected]