cjroe
(Cameron Roe)
July 19, 2017, 7:55pm
1
I’m trying to fetch from the API and getting a CORs error with the Infinitescroll plugin.
var collection_id = '595569be2559b63b8367850a';
var page = 1;
var limit = 2;
var $container = $( '.m-career-list').infiniteScroll({
path: function () {
return 'https://api.webflow.com/collections/' + collection_id + '/items?limit=' + limit + '&offset=' + (limit * page++) + '&access_token=' + webflow_token + '&api_version=1.0.0';
},
// load response as flat text
responseType: 'text',
history: false,
dataType: 'json'
});
cjroe
(Cameron Roe)
July 19, 2017, 8:43pm
2
@PixelGeek Any ideas on this? It’s currently blocking a big feature for a site I’m working on.
samliew
(webflowexpert.com)
July 19, 2017, 10:18pm
3
Can’t call API using JavaScript
Otherwise I would have many cool demos up and running already.
cjroe
(Cameron Roe)
July 19, 2017, 10:22pm
4
How would I load in items from the API then?
samliew
(webflowexpert.com)
July 19, 2017, 10:23pm
5
Need to create a server side app/proxy that does that, and hosted elsewhere.
cjroe
(Cameron Roe)
July 19, 2017, 10:24pm
6
You’re kidding. I’m on a paid plan…? You’re saying there’s no way around this, not even with jsonp or some other method of fetching public data? AND, I have to go build my own server! haha that’s crazy
system
(system)
Closed
September 18, 2017, 4:55pm
7
This topic was automatically closed after 60 days. New replies are no longer allowed.