{"name":"http-response-object","version":"1.0.0","description":"A simple object to represent an http response","keywords":["http","https","response","request"],"scripts":{"test":"node test"},"repository":{"type":"git","url":"https://github.com/ForbesLindesay/http-response-object.git"},"author":{"name":"ForbesLindesay"},"license":"MIT","bugs":{"url":"https://github.com/ForbesLindesay/http-response-object/issues"},"homepage":"https://github.com/ForbesLindesay/http-response-object","_id":"http-response-object@1.0.0","dist":{"shasum":"8fd164beb32dd3e76729a97b98ac6c1e65b055db","tarball":"http://registry-npm.ywwl.com/http-response-object/download/http-response-object-1.0.0.tgz","integrity":"sha512-PNhyv2U60Zo7MQEAE7zzfW0th1ufIB04HxpJwPugCaCgF9ISbho3TJqOOlEO53iKL26i7rI0MnKbICP3r0S9EA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB7mxybQh2vST1HBIyQXnq0jhuS74wckLVPrLd/IAyVrAiEAoWR0ZSOVUObKj8B4O10Lj+e+KKfbgpCnWWVPazSzZ6w="}],"size":2262,"noattachment":false,"key":"/http-response-object/-/http-response-object-1.0.0.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"forbeslindesay","email":"forbes@lindeay.co.uk"},"maintainers":[{"name":"forbeslindesay","email":"forbes@lindeay.co.uk"}],"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":1406897047720,"_cnpm_publish_time":1406897047720,"dist-tags":{"latest":"3.0.2"}}