How to get response header in node.js
<p>I'm working on a nodejs project, I use request module to submit restful request and get response. (here is the module link: <a href="https://github.com/request/request" rel="nofollow noreferrer">https://github.com/request/request</a>) </p>

<p>Following the instruction, I should be able to get the response header by calling <code>response.headers['']</code>,  however, seems it doesn't work, when I try to call <code>var contentType = response.headers['Content-Type']</code>,  the <code>contentType</code> is <code>undefined</code>. (When I use postman, I could get Content-Type from the response).  Anyone knows what's wrong? </p>

<p>This is the instruction from the site: </p>

<pre><code>var request = require('request')
request(
    { method: 'GET'
    , uri: 'http://www.google.com'
    , gzip: true
    }
  , function (error, response, body) {
      // body is the decompressed response body
      console.log('server encoded the data as: ' + (response.headers['content-encoding'] || 'identity'))
      console.log('the decoded data is: ' + body)
    }
</code></pre>