{"_id":"get-headers","_rev":"264872","name":"get-headers","description":"Retrieve all HTTP(s) headers as an object with original casing","dist-tags":{"latest":"1.0.5"},"maintainers":[{"name":"blakeembrey","email":"hello@blakeembrey.com"}],"time":{"modified":"2021-06-03T17:02:54.000Z","created":"2015-08-04T21:27:57.075Z","1.0.5":"2017-03-18T00:39:15.183Z","1.0.4":"2016-06-20T18:10:54.271Z","1.0.3":"2015-11-21T20:57:22.997Z","1.0.2":"2015-08-17T19:56:57.548Z","1.0.1":"2015-08-06T23:09:50.845Z","1.0.0":"2015-08-04T21:27:57.075Z"},"users":{},"author":{"name":"Blake Embrey","email":"hello@blakeembrey.com","url":"http://blakeembrey.me"},"repository":{"type":"git","url":"git://github.com/blakeembrey/get-headers.git"},"versions":{"1.0.5":{"name":"get-headers","version":"1.0.5","description":"Retrieve all HTTP(s) headers as an object with original casing","main":"lib/index.js","typings":"lib/index.d.ts","files":["lib/","LICENSE"],"scripts":{"lint":"tslint \"src/**/*.ts\"","build-ts":"tsc","build":"rm -rf lib && npm run build-ts","test-spec":"mocha lib/**/*.spec.js -R spec --bail","test-cov":"istanbul cover -x *.spec.js node_modules/mocha/bin/_mocha -- lib/**/*.spec.js -R spec --bail","test":"npm run build && npm run lint && npm run test-cov","prepublish":"typings install && npm run build"},"repository":{"type":"git","url":"git://github.com/blakeembrey/get-headers.git"},"keywords":["headers","raw","parse","http","object"],"author":{"name":"Blake Embrey","email":"hello@blakeembrey.com","url":"http://blakeembrey.me"},"license":"MIT","bugs":{"url":"https://github.com/blakeembrey/get-headers/issues"},"homepage":"https://github.com/blakeembrey/get-headers","devDependencies":{"chai":"^3.2.0","istanbul":"^0.4.4","mocha":"^3.0.0","tslint":"^4.5.1","tslint-config-standard":"^4.0.0","typescript":"^2.2.1","typings":"^2.1.0"},"gitHead":"dbe0d646efcba2dd306598ac5b21f1a61782765b","_id":"get-headers@1.0.5","_shasum":"aed975a92ddcbe14bea861bc3071cc50c539d8a4","_from":".","_npmVersion":"3.10.10","_nodeVersion":"7.3.0","_npmUser":{"name":"blakeembrey","email":"hello@blakeembrey.com"},"dist":{"shasum":"aed975a92ddcbe14bea861bc3071cc50c539d8a4","size":5021,"noattachment":false,"key":"/get-headers/-/get-headers-1.0.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/get-headers/download/get-headers-1.0.5.tgz"},"maintainers":[{"name":"blakeembrey","email":"hello@blakeembrey.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/get-headers-1.0.5.tgz_1489797554926_0.46223803400062025"},"directories":{},"publish_time":1489797555183,"_cnpm_publish_time":1489797555183,"_hasShrinkwrap":false},"1.0.4":{"name":"get-headers","version":"1.0.4","description":"Retrieve all HTTP(s) headers as an object with original casing","main":"lib/index.js","typings":"lib/index.d.ts","files":["lib/","LICENSE"],"scripts":{"lint":"# tslint \"src/**/*.ts\"","build-ts":"tsc","build":"rm -rf lib && npm run build-ts","test-spec":"mocha lib/**/*.spec.js -R spec --bail","test-cov":"istanbul cover -x *.spec.js node_modules/mocha/bin/_mocha -- lib/**/*.spec.js -R spec --bail","test":"npm run build && npm run lint && npm run test-cov","prepublish":"typings install && npm run build"},"repository":{"type":"git","url":"git://github.com/blakeembrey/get-headers.git"},"keywords":["headers","raw","parse","http","object"],"author":{"name":"Blake Embrey","email":"hello@blakeembrey.com","url":"http://blakeembrey.me"},"license":"MIT","bugs":{"url":"https://github.com/blakeembrey/get-headers/issues"},"homepage":"https://github.com/blakeembrey/get-headers","devDependencies":{"chai":"^3.2.0","istanbul":"^0.4.4","mocha":"^2.2.5","tslint":"^3.11.0","tslint-config-standard":"^1.2.2","typescript":"^1.6.2","typings":"^1.3.0"},"gitHead":"d147771dd520dfdeff5bfbb331d2180d73ca86dd","_id":"get-headers@1.0.4","_shasum":"e7f073302887f58001abda7d352c70fe060c2af5","_from":".","_npmVersion":"3.9.3","_nodeVersion":"6.2.1","_npmUser":{"name":"blakeembrey","email":"hello@blakeembrey.com"},"dist":{"shasum":"e7f073302887f58001abda7d352c70fe060c2af5","size":4239,"noattachment":false,"key":"/get-headers/-/get-headers-1.0.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/get-headers/download/get-headers-1.0.4.tgz"},"maintainers":[{"name":"blakeembrey","email":"hello@blakeembrey.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/get-headers-1.0.4.tgz_1466446251444_0.9007678076159209"},"directories":{},"publish_time":1466446254271,"_cnpm_publish_time":1466446254271,"_hasShrinkwrap":false},"1.0.3":{"name":"get-headers","version":"1.0.3","description":"Retrieve all HTTP(s) headers as an object with original casing","main":"lib/index.js","typings":"lib/index.d.ts","files":["lib/","typings.json","LICENSE"],"scripts":{"lint":"# TODO","build-ts":"tsc","build":"rm -rf lib && npm run build-ts","test-spec":"mocha lib/**/*.spec.js -R spec --bail","test-cov":"istanbul cover -x *.spec.js node_modules/mocha/bin/_mocha -- lib/**/*.spec.js -R spec --bail","test":"npm run build && npm run lint && npm run test-cov","prepublish":"typings install && npm run build"},"repository":{"type":"git","url":"git://github.com/blakeembrey/get-headers.git"},"keywords":["headers","raw","parse","http","object"],"author":{"name":"Blake Embrey","email":"hello@blakeembrey.com","url":"http://blakeembrey.me"},"license":"MIT","bugs":{"url":"https://github.com/blakeembrey/get-headers/issues"},"homepage":"https://github.com/blakeembrey/get-headers","devDependencies":{"chai":"^3.2.0","istanbul":"^0.3.17","mocha":"^2.2.5","pre-commit":"^1.1.1","typescript":"^1.6.2","typings":"^0.2.2"},"gitHead":"c019f5b74bcfcbe8942dea85e00be6c1ed768510","_id":"get-headers@1.0.3","_shasum":"faf8a8be8a46227b1ce7a9dbda3d09aee4db29a6","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.1.0","_npmUser":{"name":"blakeembrey","email":"hello@blakeembrey.com"},"dist":{"shasum":"faf8a8be8a46227b1ce7a9dbda3d09aee4db29a6","size":4639,"noattachment":false,"key":"/get-headers/-/get-headers-1.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/get-headers/download/get-headers-1.0.3.tgz"},"maintainers":[{"name":"blakeembrey","email":"hello@blakeembrey.com"}],"directories":{},"publish_time":1448139442997,"_cnpm_publish_time":1448139442997,"_hasShrinkwrap":false},"1.0.2":{"name":"get-headers","version":"1.0.2","description":"Retrieve all HTTP(s) headers as an object with original casing","main":"lib/index.js","files":["lib/","LICENSE"],"scripts":{"lint":"# TODO","build-ts":"ntsc","build":"rm -rf lib && npm run build-ts","test-spec":"mocha lib/**/*.spec.js -R spec --bail","test-cov":"istanbul cover -x *.spec.js node_modules/mocha/bin/_mocha -- lib/**/*.spec.js -R spec --bail","test":"npm run build && npm run lint && npm run test-cov","prepublish":"npm run build"},"repository":{"type":"git","url":"git://github.com/blakeembrey/get-headers.git"},"keywords":["headers","raw","parse","http","object"],"author":{"name":"Blake Embrey","email":"hello@blakeembrey.com","url":"http://blakeembrey.me"},"license":"MIT","bugs":{"url":"https://github.com/blakeembrey/get-headers/issues"},"homepage":"https://github.com/blakeembrey/get-headers","devDependencies":{"chai":"^3.2.0","istanbul":"^0.3.17","mocha":"^2.2.5","ntypescript":"^1.201507311101.1","pre-commit":"^1.1.1"},"gitHead":"49668e939772ba2c8b1abd01356fd4349a3d5e09","_id":"get-headers@1.0.2","_shasum":"6d712194ab74b2cd1fc9cb67fb8045eb243a0381","_from":".","_npmVersion":"2.11.3","_nodeVersion":"0.12.7","_npmUser":{"name":"blakeembrey","email":"hello@blakeembrey.com"},"dist":{"shasum":"6d712194ab74b2cd1fc9cb67fb8045eb243a0381","size":4421,"noattachment":false,"key":"/get-headers/-/get-headers-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/get-headers/download/get-headers-1.0.2.tgz"},"maintainers":[{"name":"blakeembrey","email":"hello@blakeembrey.com"}],"directories":{},"publish_time":1439841417548,"_cnpm_publish_time":1439841417548,"_hasShrinkwrap":false},"1.0.1":{"name":"get-headers","version":"1.0.1","description":"Retrieve all HTTP(s) headers as an object with original casing","main":"lib/index.js","files":["lib/","LICENSE"],"scripts":{"lint":"# TODO","build-ts":"ntsc","build":"rm -rf lib && npm run build-ts","test-spec":"mocha lib/**/*.spec.js -R spec --bail","test-cov":"istanbul cover -x *.spec.js node_modules/mocha/bin/_mocha -- lib/**/*.spec.js -R spec --bail","test":"npm run build && npm run lint && npm run test-cov","prepublish":"npm run build"},"repository":{"type":"git","url":"git://github.com/blakeembrey/get-headers.git"},"keywords":["headers","raw","parse","http","object"],"author":{"name":"Blake Embrey","email":"hello@blakeembrey.com","url":"http://blakeembrey.me"},"license":"MIT","bugs":{"url":"https://github.com/blakeembrey/get-headers/issues"},"homepage":"https://github.com/blakeembrey/get-headers","devDependencies":{"chai":"^3.2.0","istanbul":"^0.3.17","mocha":"^2.2.5","ntypescript":"^1.201507311101.1","pre-commit":"^1.1.1"},"gitHead":"679b9d2f6fefef67038fc8dc62692651bd7fb83b","_id":"get-headers@1.0.1","_shasum":"bde54115b7c94713837c17649f1b18300a06d143","_from":".","_npmVersion":"2.11.3","_nodeVersion":"0.12.7","_npmUser":{"name":"blakeembrey","email":"hello@blakeembrey.com"},"dist":{"shasum":"bde54115b7c94713837c17649f1b18300a06d143","size":4023,"noattachment":false,"key":"/get-headers/-/get-headers-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/get-headers/download/get-headers-1.0.1.tgz"},"maintainers":[{"name":"blakeembrey","email":"hello@blakeembrey.com"}],"directories":{},"publish_time":1438902590845,"_cnpm_publish_time":1438902590845,"_hasShrinkwrap":false},"1.0.0":{"name":"get-headers","version":"1.0.0","description":"Retrieve all HTTP(s) headers as an object with original casing","main":"lib/index.js","files":["lib/","LICENSE"],"scripts":{"lint":"# TODO","build-ts":"ntsc","build":"rm -rf lib && npm run build-ts","test-spec":"mocha lib/**/*.spec.js -R spec --bail","test-cov":"istanbul cover -x *.spec.js node_modules/mocha/bin/_mocha -- lib/**/*.spec.js -R spec --bail","test":"npm run build && npm run lint && npm run test-cov","prepublish":"npm run build"},"repository":{"type":"git","url":"git://github.com/blakeembrey/get-headers.git"},"keywords":["headers","raw","parse","http","object"],"author":{"name":"Blake Embrey","email":"hello@blakeembrey.com","url":"http://blakeembrey.me"},"license":"MIT","bugs":{"url":"https://github.com/blakeembrey/get-headers/issues"},"homepage":"https://github.com/blakeembrey/get-headers","devDependencies":{"chai":"^3.2.0","istanbul":"^0.3.17","mocha":"^2.2.5","ntypescript":"^1.201507311101.1","pre-commit":"^1.1.1"},"gitHead":"9dc949fc290d94aacaa78af710a29fd81fd92288","_id":"get-headers@1.0.0","_shasum":"db95a7fcf4d1e69acf7697107053f320be983f36","_from":".","_npmVersion":"2.13.2","_nodeVersion":"2.5.0","_npmUser":{"name":"blakeembrey","email":"hello@blakeembrey.com"},"dist":{"shasum":"db95a7fcf4d1e69acf7697107053f320be983f36","size":3786,"noattachment":false,"key":"/get-headers/-/get-headers-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/get-headers/download/get-headers-1.0.0.tgz"},"maintainers":[{"name":"blakeembrey","email":"hello@blakeembrey.com"}],"directories":{},"publish_time":1438723677075,"_cnpm_publish_time":1438723677075,"_hasShrinkwrap":false}},"readme":"# Get Headers\n\n[![NPM version][npm-image]][npm-url]\n[![NPM downloads][downloads-image]][downloads-url]\n[![Build status][travis-image]][travis-url]\n[![Test coverage][coveralls-image]][coveralls-url]\n\n> Retrieve all HTTP(s) headers as an object with original casing.\n\n## Installation\n\n```sh\nnpm install get-headers --save\n```\n\n## Usage\n\n### Parse\n\nParse a headers string. Useful for `XMLHttpRequest` instances.\n\n```js\nimport { parse } from 'get-headers'\n\nparse(xhr.getAllResponseHeaders()) //=> {}\n```\n\n### HTTP\n\nParse headers from `http` responses. Works properly with node >= 0.12 (when the `rawHeaders` property was released) and falls back to normal headers on lower versions.\n\n```js\nimport { get } from 'http'\nimport { http } from 'get-headers'\n\nget('http://example.com', (res) => {\n  http(res) //=> { 'Accept-Ranges': 'bytes', 'Cache-Control': 'max-age=604800', 'Content-Type': 'text/html', Date: 'Mon, 17 Aug 2015 19:53:03 GMT', Etag: '\"359670651\"', Expires: 'Mon, 24 Aug 2015 19:53:03 GMT', 'Last-Modified': 'Fri, 09 Aug 2013 23:54:35 GMT', Server: 'ECS (rhv/818F)', 'X-Cache': 'HIT', 'x-ec-custom-error': '1', 'Content-Length': '1270', Connection: 'close' }\n})\n```\n\n### Array\n\nParse an array of headers (E.g. `rawHeaders`). Every odd must be the header name and evens the header value.\n\n```js\nimport { array } from 'get-headers'\n\narray(['Content-Type', 'application/json']) //=> { 'Content-Type': 'application/json' }\n```\n\n## License\n\nMIT\n\n[npm-image]: https://img.shields.io/npm/v/get-headers.svg?style=flat\n[npm-url]: https://npmjs.org/package/get-headers\n[downloads-image]: https://img.shields.io/npm/dm/get-headers.svg?style=flat\n[downloads-url]: https://npmjs.org/package/get-headers\n[travis-image]: https://img.shields.io/travis/blakeembrey/get-headers.svg?style=flat\n[travis-url]: https://travis-ci.org/blakeembrey/get-headers\n[coveralls-image]: https://img.shields.io/coveralls/blakeembrey/get-headers.svg?style=flat\n[coveralls-url]: https://coveralls.io/r/blakeembrey/get-headers?branch=master\n","_attachments":{},"homepage":"https://github.com/blakeembrey/get-headers","bugs":{"url":"https://github.com/blakeembrey/get-headers/issues"},"license":"MIT"}