title: How to implement cookiejar wtih http2
body: <p>I'm trying to make some http2 requests but I have no idea how to implement a cookie jar/container in node at all - not with standard http or http2. I've looked online but I've yet to find a solution. Say for example I want to make the following http2 request:</p>
  
  <pre><code>const client = http2.connect('https://twitter.com');
  const req = client.request({':method': 'GET', ':path': '/' });
  req.setEncoding("utf8");
  var body = "";
  req.on('response', (responseHeaders) =&gt; {
  
  });
  req.on('data', (chunk) =&gt; {
      body += chunk;
  });
  req.on('end', () =&gt;{ 
      console.log(body);
  
      client.destroy();
  });
  </code></pre>
  
  <p>how would I then go about handling cookies/sessions between subsequent requests. For example this request sets cookies in the response header. How would I carry those cookies on to the next request?</p>