Question

Judging by the comments on issue 554, I would think that Fusion Tables had support for CORS requests. Trying the following though gives a cross site error (in Chrome):

xhr = new XMLHttpRequest()
xhr.open("GET","http://www.google.com/fusiontables/api/query?sql=SELECT%20*%20FROM%201906375")
xhr.send()

The error is: Origin http://[domain] is not allowed by Access-Control-Allow-Origin.

The following example works fine (for comparison), a simple PHP page where I set the "CORS" header and echo the origin server back like, "hello example.com":

xhr = new XMLHttpRequest()
xhr.open("GET","http://skipperkongen.dk/services/corstest/hellocors.php")
xhr.send()

I must admit that I've found nowhere on the web that explicitly says that fusion tables supports CORS, but I kind of expect it (judging also by the comments in the issue)...

Am I doing it wrong?

Was it helpful?

Solution

The headers were updated only for the (undocumented and subject to change) JSONP interface:

http://www.google.com/fusiontables/api/query?sql=&jsonCallback=

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top