{"_id":"request-shared","_rev":"62528","name":"request-shared","description":"Logic for normalizing arguments for an http request","dist-tags":{"latest":"0.0.1"},"maintainers":[{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"}],"time":{"modified":"2021-06-03T10:21:10.000Z","created":"2014-02-09T12:06:40.760Z","0.0.1":"2014-02-09T12:06:40.760Z"},"users":{},"author":{"name":"ForbesLindesay"},"repository":{"type":"git","url":"https://github.com/ForbesLindesay/request-shared.git"},"versions":{"0.0.1":{"name":"request-shared","version":"0.0.1","description":"Logic for normalizing arguments for an http request","keywords":[],"browser":{"./lib/buffer.js":"./lib/buffer-browser.js"},"dependencies":{"qs":"0.6.6"},"devDependencies":{"testit":"~1.2.0"},"scripts":{"test":"node test/index.js"},"repository":{"type":"git","url":"https://github.com/ForbesLindesay/request-shared.git"},"author":{"name":"ForbesLindesay"},"license":"MIT","bugs":{"url":"https://github.com/ForbesLindesay/request-shared/issues"},"homepage":"https://github.com/ForbesLindesay/request-shared","_id":"request-shared@0.0.1","dist":{"shasum":"7c6505a6296d6e18c3c19f2f241c115fe870b544","size":4549,"noattachment":false,"key":"/request-shared/-/request-shared-0.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/request-shared/download/request-shared-0.0.1.tgz"},"_from":".","_npmVersion":"1.3.21","_npmUser":{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},"maintainers":[{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"}],"directories":{},"publish_time":1391947600760,"_cnpm_publish_time":1391947600760,"_hasShrinkwrap":false}},"readme":"# request-shared\n\nLogic for normalizing arguments for an http request\n\n[![Build Status](https://travis-ci.org/ForbesLindesay/request-shared.png?branch=master)](https://travis-ci.org/ForbesLindesay/request-shared)\n[![Dependency Status](https://gemnasium.com/ForbesLindesay/request-shared.png)](https://gemnasium.com/ForbesLindesay/request-shared)\n[![NPM version](https://badge.fury.io/js/request-shared.png)](http://badge.fury.io/js/request-shared)\n\n## Installation\n\n    npm install request-shared\n\n## Request\n\n```js\nvar Request = require('request-shared').Request;\nvar req = new Request('http://www.example.com', {method: 'post'});\n```\n\n## Response\n\n```js\nvar Response = require('request-shared').Response;\nvar res = new Response(200, {}, new Buffer('A ok'));\n//res.statusCode === 200\n//res.headers === {}\n//res.body === new Buffer('A ok')\nres.getBody();\n// => new Buffer('A ok')\n\nvar res = new Response(404, {'Header': 'value'}, new Buffer('Wheres this page'));\n//res.statusCode === 404\n//res.headers === {header: 'value'}\n//res.body === new Buffer('Wheres this page')\nres.getBody();\n// => throws error with `statusCode`, `headers` and `body` properties.\n```\n\n## License\n\n  MIT","_attachments":{},"homepage":"https://github.com/ForbesLindesay/request-shared","bugs":{"url":"https://github.com/ForbesLindesay/request-shared/issues"},"license":"MIT"}