{"name":"http-response-object","version":"3.0.2","main":"lib/index.js","types":"lib/index.d.ts","description":"A simple object to represent an http response","keywords":["http","https","response","request"],"scripts":{"prepublishOnly":"npm run build","build":"tsc && flowgen lib/**/*","pretest":"npm run build","test":"node test"},"repository":{"type":"git","url":"git+https://github.com/ForbesLindesay/http-response-object.git"},"author":{"name":"ForbesLindesay"},"license":"MIT","dependencies":{"@types/node":"^10.0.3"},"devDependencies":{"flowgen2":"^2.2.1","typescript":"^2.3.4"},"gitHead":"be88b526b0486df041dc4adaef988399c42dc3c2","bugs":{"url":"https://github.com/ForbesLindesay/http-response-object/issues"},"homepage":"https://github.com/ForbesLindesay/http-response-object#readme","_id":"http-response-object@3.0.2","_npmVersion":"6.4.1","_nodeVersion":"10.12.0","_npmUser":{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},"dist":{"integrity":"sha512-bqX0XTF6fnXSQcEJ2Iuyr75yVakyjIDCqroJQ/aHfSdlM743Cwqoi2nDYMzLGWUcuTWGWy8AAvOKXTfiv6q9RA==","shasum":"7f435bb210454e4360d074ef1f989d5ea8aa9810","tarball":"http://registry-npm.ywwl.com/http-response-object/download/http-response-object-3.0.2.tgz","fileCount":9,"unpackedSize":6784,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJckdZwCRA9TVsSAnZWagAA1SgP/RICpJsplssN5mtuqFwm\nNUTM/UnuETokzqtwlPHxmJR8X44xVm8QwhImCuoaPbeYZQ3yF4k5mKCVuROQ\n5dsZm7FmYUEJ1mkzWufyWAWJij9hSrF18QEFkvpL6r+5h/DtqX3eLwJlCZCd\nF5LcJKFvNGbfz/oS8ETUdqmF0+Unho6vLOxPpytjZcXueGkFoRR2BV1S0sTI\nBH6kl1qzJlH+hz2SUxlY6iC6oWHZgMZqMb2ejoHM93iL6Z+sneJ/oeDjtd13\n0/oVbuiJBJmxDsivxKv8oBh5v4oIlFDHqqleG+qRkeaHIj+FPOJ1hf1eSJ+u\n7tJ4FNbSXAND6MCh2WGNNVioxlF4iIl0EedTEBWQp5gDLjPb5LyX3HBwaVKO\njuuNxeL/tBOLk40diQf2ReDxpP5G6qZngGzdxVxu+acafF30Yc7cHHGY6vOM\nXUsw1EfsJ2OwGiHXiVQCwiH7iCsVjR5TZyf/apCwd4jfQTxtXI3pEAxK7irD\nhFJgk7pbzjRpdpTH7NRdSqDEzEs6hjtL2t9ogd00XJYCAgXw9S0eVq7dEmY8\nKf7elKfJfo4twDByPS1KlJKHHJazAOnwkTopRwI6Mcz7EtblWLWr5cCpEyx3\nBZ8z3HoUUD90d2jCPLjnyQIXeAMFauOohH6D8huZeCo2cpHQawWlw4JzesE5\nN9uA\r\n=CQXk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH5+XWK7zqsTlMzliXM5XRkWLVxY9IeG8KZn30d41x4IAiEA4guTlzjWESY43B6CSr2gd1/FvoG/gxXeW8tddBx97yQ="}],"size":2801,"noattachment":false,"key":"/http-response-object/-/http-response-object-3.0.2.tgz"},"maintainers":[{"name":"forbeslindesay","email":"forbes@lindeay.co.uk"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/http-response-object_3.0.2_1553061488144_0.5296542050098769"},"_hasShrinkwrap":false,"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":1553061488292,"_cnpm_publish_time":1553061488292,"dist-tags":{"latest":"3.0.2"}}