How does the Dataset make it's GET requests?

I have a sort of backwards problem, it’s not Xibo’s fault it’s mine for not fully understanding what I’m doing…

I’m using a google sheet published as csv for my remote dataset, the data in my dataset correctly updates.

In a layout I have a datasetview widget looking at that dataset, I also have an embedded widget with a custom script that makes an ajax request to the exact same url that the dataset uses. the ajax request fails, if I open the preview and look at chromes developer tools, I can see I’m getting a CORS error (i know enough about cors to know that it’s technically doing the right thing by blocking the request). This seems to be an intermittent issue, depending on whatever google is doing, ie. sometimes the request is redirected and sometimes it is not, when it is not redirected the data is successfully retrieved.

So my question is what is the dataset doing differently to pull this data from the same location successfully, but an ajax request fails?

The CMS makes a request with curl, so there’s no browser involved. It then processes the response and stores that data in the CMS’s database. The Players then get HTML made by the CMS to render that.

CORS problems where you’re making a request in script and the script is trying to access a resource that the policy prevents.

Alrighty then, time to rethink my whole process.

Yeah I understand the the reason for the cors error… its just frustrating as it is intermittent, the server side is out of my control, so I was hoping to copy the same type of request that the dataset uses, considering that has been stable. back to the drawing board.

Thanks Alex.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.