How do I extract parameters from an HTTP response header string?
<p>I need to authenticate against a proxy server, and after the first HTTP request the I need to parse the proxy-authenticate header string to get the relevant values.</p>

<p>The response headers look something like this,</p>

<pre><code>{ 'content-type': 'text/plain',
  'proxy-authenticate': 'Digest realm="zippy", qop="auth",nonce="c1e1c76b5df5a8cdc921b48d6a7b5493", algorithm="MD5", stale="false"',
   date: 'Thu, 21 Apr 2016 00:19:28 GMT',
   connection: 'close',
  'transfer-encoding': 'chunked' }
</code></pre>

<p>I want to extract the proxy-authenticate parameters (i.e. realm, qop, etc.), from the string.</p>

<p>It seems like there must be some super simple way to do this, but I'm just not finding it.</p>