{"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","tarball":"http://registry-npm.ywwl.com/get-headers/download/get-headers-1.0.4.tgz","integrity":"sha512-fCecLqh1VpC1aoXerhUkGMAao0XZPj6uRZnkLMmRQu97v1T0Gdl2MXl3Idxwv44HwNB6y1/NtmOeRJ2j87kfkw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD+vV3wORv+MguQH5863GTrZ9iWyIxwMP1Ufjq86001MAIgeUrmnH2RpkjOvziqQ0nL4a8c9I0bZoEEkSdCfDP2Sqw="}],"size":4239,"noattachment":false,"key":"/get-headers/-/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":{},"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","publish_time":1466446254271,"_cnpm_publish_time":1466446254271,"dist-tags":{"latest":"1.0.5"}}