I am trying to paginate products on my shopify app. I followed this tutorial: https://community.shopify.com/c/shopify-discussions/link-headers-missing-when-trying-to-paginate-products/m-p/1604760#M296825
The problem is when i request to the Shopify API, I don’t get the Link in the response header.
Here is my code :
let url = `https://${req.user.shop}/admin/api/2022-04/products.json?limit=${limit}`;
let options = {
method: 'GET',
mode: 'no-cors',
uri: url,
json: true,
headers: {
'X-Shopify-Access-Token': req.accessToken,
'content-type': 'application/json',
}
};
request(options)
.then(function (parsedBody){
console.log(res._headers);
console.log(parsedBody.products);
res.status(200).json(parsedBody.products);
}).catch(function (err) {
console.log(err);
res.json(err);
})
Thanks for your time!