title: How to redirect GET response from API to another page
body: <p>I want to know how I'm supposed to redirect to another page while using an API to get data there at the same time</p>
  
  <p>My situation:<br>
  - a product page which list all the products retrieved from API (product.html)<br>
  - A JSON API which GET data from the product ID (api/products?id=?)<br>
  - a product page which describe individual product (indiv_product.html)<br></p>
  
  <p>What I know:<br>
  Redirecting the product.html to indiv_product.html when a product is selected and clicked.<br></p>
  
  <p>What I do not know:<br>
  Calling the API in product.html because I need the ID to be specified there, and getting the response in indiv_product.html so I can populate the page with the data from the API</p>