{"name":"http-response-object","version":"2.0.0","main":"lib/index.js","types":"lib/index.d.ts","description":"A simple object to represent an http response","keywords":["http","https","response","request"],"scripts":{"build":"tsc && flowgen lib/**/*","test":"node test"},"repository":{"type":"git","url":"git+https://github.com/ForbesLindesay/http-response-object.git"},"author":{"name":"ForbesLindesay"},"license":"MIT","dependencies":{"@types/node":"^7.0.31"},"devDependencies":{"flowgen2":"^2.0.0-alpha.3","typescript":"^2.3.4"},"gitHead":"a83e8d9bffeb38164af70ae1e824df81fc296196","bugs":{"url":"https://github.com/ForbesLindesay/http-response-object/issues"},"homepage":"https://github.com/ForbesLindesay/http-response-object#readme","_id":"http-response-object@2.0.0","_npmVersion":"5.0.3","_nodeVersion":"8.0.0","_npmUser":{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},"maintainers":[{"name":"forbeslindesay","email":"forbes@lindeay.co.uk"}],"dist":{"integrity":"sha512-AqVy9T45my1tl8rIUgNNUDjMnR022p35iNmvw+5JZtWz+jtptANY/wIflQkHA/dUjNRjJQeiVRXhA4/5L15UBw==","shasum":"8a3d6c72b44a84f462b4f04959a795c5173cd745","tarball":"http://registry-npm.ywwl.com/http-response-object/download/http-response-object-2.0.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC12y+Jt72GNbAlZ6nTMH1ohm8fnn6OsIYiuiqM4SxNbAiAWbVyoBwG4QVbNZHLmuRfTyUFcU2Q4m3wdY39vWpgL3w=="}],"size":2893,"noattachment":false,"key":"/http-response-object/-/http-response-object-2.0.0.tgz"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/http-response-object-2.0.0.tgz_1497483272794_0.08031965396367013"},"directories":{},"readme":"# http-response-object\n\nA simple object to represent an http response (with flow and typescript types)\n\n[![Build Status](https://img.shields.io/travis/ForbesLindesay/http-response-object/master.svg)](https://travis-ci.org/ForbesLindesay/http-response-object)\n[![Dependency Status](https://img.shields.io/david/ForbesLindesay/http-response-object.svg)](https://david-dm.org/ForbesLindesay/http-response-object)\n[![NPM version](https://img.shields.io/npm/v/http-response-object.svg)](https://www.npmjs.org/package/http-response-object)\n\n\n## Installation\n\n    npm install http-response-object\n\n## Usage\n\n```js\nvar Response = require('http-response-object');\nvar res = new Response(200, {}, new Buffer('A ok'), 'http://example.com');\n//res.statusCode === 200\n//res.headers === {}\n//res.body === new Buffer('A ok')\n//res.url === 'http://example.com'\nres.getBody();\n// => new Buffer('A ok')\n\nvar res = new Response(404, {'Header': 'value'}, new Buffer('Wheres this page'), 'http://example.com');\n//res.statusCode === 404\n//res.headers === {header: 'value'}\n//res.body === new Buffer('Wheres this page')\n//res.url === 'http://example.com'\nres.getBody();\n// => throws error with `statusCode`, `headers`, `body` and `url` properties copied from the response\n```\n\n## Properties\n\n - `statusCode`: Number - the status code of the response\n - `headers`: Object - the headers of the response.  The keys are automatically made lower case.\n - `body`: Buffer | String - the body of the response. Should be a buffer on the server side, but may be a simple string for lighter weight clients.\n - `url`: String - the url that was requested.  If there were redirects, this should be the last url to get requested.\n\n## License\n\n  MIT\n","publish_time":1497483273740,"_cnpm_publish_time":1497483273740,"dist-tags":{"latest":"3.0.2"}}