This is my first stackoverflow question and it's a little obscure...let's see how it goes:
I'm having a problem with the Google Site Search XML API. I simply want to use javascript to make an AJAX call to the XML API and retrieve the XML. Unfortunately, this is a CORS request and the XML API response does not include an Access-Control-Allow-Origin header, so the request fails. The JSON API does include the CORS response headers, but I need the XML API. Is there a way around this? Should I be using another Google API to facilitate this?
Alternatively, can I use script tags with the source set to the search URL and somehow get the XML from inside the script tags? My understanding is you can't access the XML results in script tags if it comes from a cross-domain request.
Any help would be much appreciated!
Jason
No comments:
Post a Comment