title: Puppeteer: Network.setCookie returns invalid string param
body: <p>I'm learning to use the <a href="https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#class-cdpsession" rel="nofollow noreferrer">CDPSession class</a> in Puppeteer, but I'm having trouble with using the method parameters of the dev tools protocol.</p>
  
  <p><a href="https://chromedevtools.github.io/devtools-protocol/tot/Network" rel="nofollow noreferrer">Dev Tools Network</a></p>
  
  <p>The <code>Network.setCookie</code> section of the Dev tools docs show the params for setting the <code>name</code> cookie are: <code>name string</code>, but when I do this it returns an error: <code>Error: Protocol error (Network.setCookie): Invalid parameters value: string value expected</code>.</p>
  
  <p>What am I doing wrong?</p>
  
  <pre><code>const puppeteer = require('puppeteer');
  
  puppeteer.launch().then(async browser =&gt; {
      const page = await browser.newPage();
      const client = await page.target().createCDPSession();
      await client.send('Network.enable');
      const setCookie = await client.send('Network.setCookie', {
          name: 'mycookie'
      });
  
      console.log("Set Cookie: " + setCookie.success);
      await page.goto('https://example.com');
      await browser.close();
  });
  </code></pre>