title: Puppeteer JS headers for scraping
body: <p>I'm trying to find out how to add headers to puppeteer js.  I'm building something for the first time so I'm not familiar with this.  </p>
  
  <p>If set up my file with these, based on documentation but I'm not sure if I'm doing it correctly:</p>
  
  <pre><code>  await page.setUserAgent('Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36');
    await page.setExtraHTTPHeaders({Referer: 'https://example.com/'});
  </code></pre>
  
  <p>Other than that tutorials that I've searched aren't adding the headers.</p>
  
  <p>I want to add headers to replicate a real user in my case I’d like to replicate my browser as if I was using it manually.  What is the correct way to do that?</p>