title: Shopify get all products
body: <p>I am creating an application and at the moment I am trying to get all product data from the store, but the function does not work for me.</p>
  <p>I am making a request for this feature, but in the response I have no 'link' at all. And there is no other replacement that would link to the next page.</p>
  <pre class="lang-js prettyprint-override"><code>function makeRequest(
    nextLink = 'https://myshopname.myshopify.com/admin/api/2021-04/products.json?limit=1'
  ) {
    return new Promise((resolve, reject) =&gt; {
      console.log(nextLink);
      fetch(nextLink).then((r) =&gt; {
        const headerLink = r.headers.get('link');
        console.log(r.headers);
        console.log(headerLink);
        const match = headerLink.match(/&lt;[^;]+\/(\w+\.json[^;]+)&gt;;\srel=&quot;next&quot;/);
        const nextLink = match ? match[1] : false;
        if (nextLink) {
          makeRequest(nextLink);
        } else {
          resolve();
        }
      });
    });
  }
  
  </code></pre>
  <p>Can you help me figure out how I can make this function work and how can I get all the data from this store?</p>