title: Puppeteer Set Request Cookie Header
body: <p>I'm trying to set the cookies on each request via Puppeteer request interception. I've noticed that while setting <code>headers['sample-header']=1</code> creates header 'sample-header' equal to 1, setting <code>headers['cookie'] = x...</code> does not set the requests cookie. For instance, the following code does not set any requests cookies.</p>
  
  <pre class="lang-js prettyprint-override"><code>const browser = await puppeteer.launch({headless: false,executablePath:dirnae});
  const page = await browser.newPage();
  const client = await page.target().createCDPSession();
  
  await page.setRequestInterception(true);
  
  page.on('request', request =&gt; {
      const headers = request.headers();
      headers['cookie'] = 1;
      request.continue({ headers });
  });
  
  page.on('request', request =&gt; {
      console.log(request.headers())
  });
  
  page.on('response', response =&gt; {
      //console.log(response.headers()['set-cookie'])
  });
  
  await page.goto('https://google.com');
  </code></pre>
  
  <p>EDIT: I figured out that I can see the requests cookie header thru handling of the <code>Network.requestWillBeSentExtraInfo</code> event. </p>
  
  <p>However, I can't seem to edit requests in that event.</p>