I decided to develop an application that uses an open API that provides timetables for buses and subways in the city.
I decided to develop this application using HTML5 so that with the help of something like a telephone connection I could deploy several platforms.
During development, I found that I could not access the JSON response from the API due to the presence of the xmlhttprequest-can not-load No 'Access-Control-Allow-Origin' header on the requested resource
So, I decided to use the usual provider web space as a bridge with the php function to which I am sending a request, and which can receive a response from this API service and send the JSON result back to my HTML page.
I have two questions for which the start page or key will also be evaluated: 1) This problem in Access-Control-Allow-Origin is what will appear if I developed the application in my own code (java and ObjC)?
2) If HTML5 and javascript are compiled on a calling card, I still won’t be able to access this API service and will I still have the same problem and still have to use the php bridge?
source
share