Open mandard24 opened 7 years ago
can you change the callback prefix on each request? that's how I solved my issue. Something like:
jsonp(
${url}&callback=${cbPrefix}, { timeout: 1000, prefix: cbPrefix }, (err, data) => {
that cbPrefix is different at each request
Hi,
I'm doing multiple jsonp calls from one page to get a set of images for each of the product that will be rendered on the page. Even though I see all the requests return response(status - 200) for each of the jsonp call, I'm only able to get the data for one product only(mostly its the last product on the page).
IMPORTANT: all the jsonp requests uses same callbackto return the content.
I'm using React component to render product list by iterating through an array. Every time a new product list component is called/created, i make the jsonp request to fetch the set of images and display on the page.
When my page renders I see only one of the product shows the list of images. And rest of the jsonp request end up in 'Timeout' error.
Can someone show me how to make these multiple jsonp requests each with the same jsonp callback that simply gets content for each of the product?