The response object in Node's http module (an instance of http.IncomingMessage) exposes the response headers via response.headers (and not response.getHeader()). This module does the opposite - http-browserify's response object has response.getHeader() (and not response.headers).
The response object should be changed to match Node core's http module by adding .headers and removing .getHeader().
The response object in Node's http module (an instance of http.IncomingMessage) exposes the response headers via
response.headers(and notresponse.getHeader()). This module does the opposite - http-browserify's response object hasresponse.getHeader()(and notresponse.headers).The response object should be changed to match Node core's http module by adding
.headersand removing.getHeader().