{"_id":"http-response-object","_rev":"278644","name":"http-response-object","description":"A simple object to represent an http response","dist-tags":{"latest":"3.0.2"},"maintainers":[{"name":"forbeslindesay","email":""}],"time":{"modified":"2023-09-20T17:54:07.000Z","created":"2014-08-01T12:44:07.720Z","3.0.2":"2019-03-20T05:58:08.292Z","3.0.1":"2018-01-31T10:42:27.128Z","3.0.0":"2018-01-31T10:28:00.284Z","2.0.3":"2017-06-16T09:57:29.837Z","2.0.2":"2017-06-16T01:11:06.647Z","2.0.1":"2017-06-14T23:39:26.106Z","2.0.0":"2017-06-14T23:34:33.740Z","1.1.0":"2015-10-15T09:57:42.489Z","1.0.1":"2014-08-01T15:57:33.178Z","1.0.0":"2014-08-01T12:44:07.720Z"},"users":{},"author":{"name":"ForbesLindesay"},"repository":{"type":"git","url":"git+https://github.com/ForbesLindesay/http-response-object.git"},"versions":{"3.0.2":{"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":{"shasum":"7f435bb210454e4360d074ef1f989d5ea8aa9810","size":2801,"noattachment":false,"key":"/http-response-object/-/http-response-object-3.0.2.tgz","tarball":"http://name.csiicloud.com:7001/http-response-object/download/http-response-object-3.0.2.tgz"},"maintainers":[{"name":"forbeslindesay","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/http-response-object_3.0.2_1553061488144_0.5296542050098769"},"_hasShrinkwrap":false,"publish_time":1553061488292,"_cnpm_publish_time":1553061488292,"_cnpmcore_publish_time":"2021-12-16T16:04:03.663Z"},"3.0.1":{"name":"http-response-object","version":"3.0.1","main":"lib/index.js","types":"lib/index.d.ts","files":["lib"],"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":"^9.3.0"},"devDependencies":{"flowgen2":"^2.0.0-alpha.5","typescript":"^2.3.4"},"gitHead":"0ec369b2f197edb1fc51c22f6a980c1d821ecc45","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.1","_npmVersion":"5.5.1","_nodeVersion":"8.9.1","_npmUser":{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},"dist":{"shasum":"90174d44c27b5e797cf6efe51a043bc889ae64bf","size":2848,"noattachment":false,"key":"/http-response-object/-/http-response-object-3.0.1.tgz","tarball":"http://name.csiicloud.com:7001/http-response-object/download/http-response-object-3.0.1.tgz"},"maintainers":[{"name":"forbeslindesay","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/http-response-object-3.0.1.tgz_1517395346326_0.27434256323613226"},"directories":{},"publish_time":1517395347128,"_hasShrinkwrap":false,"_cnpm_publish_time":1517395347128,"_cnpmcore_publish_time":"2021-12-16T16:04:04.172Z"},"3.0.0":{"name":"http-response-object","version":"3.0.0","main":"lib/index.js","types":"lib/index.d.ts","files":["lib"],"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":"^9.3.0"},"devDependencies":{"flowgen2":"^2.0.0-alpha.5","typescript":"^2.3.4"},"gitHead":"654fcaaff46b1692283c0412c7fa45c9e17f8eb0","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.0","_npmVersion":"5.5.1","_nodeVersion":"8.9.1","_npmUser":{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},"dist":{"shasum":"78432422b1ddf2fe5f05825a1778f6a58820f9af","size":2807,"noattachment":false,"key":"/http-response-object/-/http-response-object-3.0.0.tgz","tarball":"http://name.csiicloud.com:7001/http-response-object/download/http-response-object-3.0.0.tgz"},"maintainers":[{"name":"forbeslindesay","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/http-response-object-3.0.0.tgz_1517394479351_0.5823880033567548"},"directories":{},"publish_time":1517394480284,"_hasShrinkwrap":false,"_cnpm_publish_time":1517394480284,"_cnpmcore_publish_time":"2021-12-16T16:04:04.409Z"},"2.0.3":{"name":"http-response-object","version":"2.0.3","main":"lib/index.js","types":"lib/index.d.ts","files":["lib"],"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":"^7.0.31"},"devDependencies":{"flowgen2":"^2.0.0-alpha.5","typescript":"^2.3.4"},"gitHead":"9a6f09bcd000b9bc7ded9d77871bea0c08c4de0b","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.3","_npmVersion":"5.0.3","_nodeVersion":"8.0.0","_npmUser":{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},"maintainers":[{"name":"forbeslindesay","email":""}],"dist":{"shasum":"530a48c3b6b683be2398fc42417f7c54f8b401a8","size":2660,"noattachment":false,"key":"/http-response-object/-/http-response-object-2.0.3.tgz","tarball":"http://name.csiicloud.com:7001/http-response-object/download/http-response-object-2.0.3.tgz"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/http-response-object-2.0.3.tgz_1497607048896_0.133782843593508"},"directories":{},"publish_time":1497607049837,"_hasShrinkwrap":false,"_cnpm_publish_time":1497607049837,"_cnpmcore_publish_time":"2021-12-16T16:04:04.635Z"},"2.0.2":{"name":"http-response-object","version":"2.0.2","main":"lib/index.js","types":"lib/index.d.ts","files":["lib"],"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":"^7.0.31"},"devDependencies":{"flowgen2":"^2.0.0-alpha.4","typescript":"^2.3.4"},"gitHead":"fa9c298463aec5dc7531d27077210b50bc53c569","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.2","_npmVersion":"5.0.3","_nodeVersion":"8.0.0","_npmUser":{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},"maintainers":[{"name":"forbeslindesay","email":""}],"dist":{"shasum":"d035f7c008c5812634ccce252a105fab01678698","size":2639,"noattachment":false,"key":"/http-response-object/-/http-response-object-2.0.2.tgz","tarball":"http://name.csiicloud.com:7001/http-response-object/download/http-response-object-2.0.2.tgz"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/http-response-object-2.0.2.tgz_1497575464222_0.25760255055502057"},"directories":{},"publish_time":1497575466647,"_hasShrinkwrap":false,"_cnpm_publish_time":1497575466647,"_cnpmcore_publish_time":"2021-12-16T16:04:05.127Z"},"2.0.1":{"name":"http-response-object","version":"2.0.1","main":"lib/index.js","types":"lib/index.d.ts","files":["lib"],"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":"ac3c79c2b182ee10e18bc4996d9d1563cb12fb71","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.1","_npmVersion":"5.0.3","_nodeVersion":"8.0.0","_npmUser":{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},"maintainers":[{"name":"forbeslindesay","email":""}],"dist":{"shasum":"a71e131356f68ce247ec9a453cae5b8a0f23dcd2","size":2624,"noattachment":false,"key":"/http-response-object/-/http-response-object-2.0.1.tgz","tarball":"http://name.csiicloud.com:7001/http-response-object/download/http-response-object-2.0.1.tgz"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/http-response-object-2.0.1.tgz_1497483565136_0.7109775701537728"},"directories":{},"publish_time":1497483566106,"_hasShrinkwrap":false,"_cnpm_publish_time":1497483566106,"_cnpmcore_publish_time":"2021-12-16T16:04:05.667Z"},"2.0.0":{"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":""}],"dist":{"shasum":"8a3d6c72b44a84f462b4f04959a795c5173cd745","size":2893,"noattachment":false,"key":"/http-response-object/-/http-response-object-2.0.0.tgz","tarball":"http://name.csiicloud.com:7001/http-response-object/download/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":{},"publish_time":1497483273740,"_hasShrinkwrap":false,"_cnpm_publish_time":1497483273740,"_cnpmcore_publish_time":"2021-12-16T16:04:05.909Z"},"1.1.0":{"name":"http-response-object","version":"1.1.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","gitHead":"9a1467c6335afd803a649cd3b79cd5e3931b9ac6","bugs":{"url":"https://github.com/ForbesLindesay/http-response-object/issues"},"homepage":"https://github.com/ForbesLindesay/http-response-object","_id":"http-response-object@1.1.0","_shasum":"a7c4e75aae82f3bb4904e4f43f615673b4d518c3","_from":".","_npmVersion":"2.7.1","_nodeVersion":"1.6.2","_npmUser":{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},"maintainers":[{"name":"forbeslindesay","email":""}],"dist":{"shasum":"a7c4e75aae82f3bb4904e4f43f615673b4d518c3","size":3273,"noattachment":false,"key":"/http-response-object/-/http-response-object-1.1.0.tgz","tarball":"http://name.csiicloud.com:7001/http-response-object/download/http-response-object-1.1.0.tgz"},"directories":{},"publish_time":1444903062489,"_hasShrinkwrap":false,"_cnpm_publish_time":1444903062489,"_cnpmcore_publish_time":"2021-12-16T16:04:06.106Z"},"1.0.1":{"name":"http-response-object","version":"1.0.1","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.1","dist":{"shasum":"4b198849508354a9cebd5192db92bb88416fa0af","size":2279,"noattachment":false,"key":"/http-response-object/-/http-response-object-1.0.1.tgz","tarball":"http://name.csiicloud.com:7001/http-response-object/download/http-response-object-1.0.1.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"forbeslindesay","email":"forbes@lindeay.co.uk"},"maintainers":[{"name":"forbeslindesay","email":""}],"directories":{},"publish_time":1406908653178,"_hasShrinkwrap":false,"_cnpm_publish_time":1406908653178,"_cnpmcore_publish_time":"2021-12-16T16:04:06.503Z"},"1.0.0":{"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","size":2262,"noattachment":false,"key":"/http-response-object/-/http-response-object-1.0.0.tgz","tarball":"http://name.csiicloud.com:7001/http-response-object/download/http-response-object-1.0.0.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"forbeslindesay","email":"forbes@lindeay.co.uk"},"maintainers":[{"name":"forbeslindesay","email":""}],"directories":{},"publish_time":1406897047720,"_hasShrinkwrap":false,"_cnpm_publish_time":1406897047720,"_cnpmcore_publish_time":"2021-12-16T16:04:06.807Z"}},"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","_attachments":{},"homepage":"https://github.com/ForbesLindesay/http-response-object#readme","bugs":{"url":"https://github.com/ForbesLindesay/http-response-object/issues"},"license":"MIT"}