{"_id":"connect-restreamer","_rev":"11-444fa69ed335e738502cc4f898450e13","name":"connect-restreamer","description":"re-stream a parsed body so that it can be proxied.","dist-tags":{"latest":"1.0.3"},"versions":{"1.0.0":{"name":"connect-restreamer","version":"1.0.0","description":"re-stream a parsed body so that it can be proxied.","homepage":"http://github.com/dominictarr/connect-restreamer","repository":{"type":"git","url":"git://github.com/dominictarr/connect-restreamer.git"},"author":{"name":"Dominic Tarr","email":"dominic.tarr@gmail.com","url":"http://bit.ly/dominictarr"},"_npmJsonOpts":{"file":"/home/dominic/.npm/connect-restreamer/1.0.0/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"connect-restreamer@1.0.0","dependencies":{},"devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.13","_nodeVersion":"v0.4.8","_defaultsLoaded":true,"dist":{"shasum":"4476dc9c40389d80fbb6fc3d1e46663ce780e319","tarball":"https://registry.npmjs.org/connect-restreamer/-/connect-restreamer-1.0.0.tgz","integrity":"sha512-EL27HjSwAPKylxYq+y8rFf3Uste2X0u4QbknhiaM6pwN3mAOj8Nh+CeXPQl+9AU/eLLmo48hLafJZgtcmF3hEQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG2Kn7VMUlfSQLTFZqBLJOzeUxKSG9RTCfUcLsmQr2TKAiEAmgcER66/StUvAaJ8iHdMg1DkRQ4egUG2STnX7DcPzXI="}]},"scripts":{}},"1.0.1":{"name":"connect-restreamer","version":"1.0.1","description":"re-stream a parsed body so that it can be proxied.","homepage":"http://github.com/dominictarr/connect-restreamer","repository":{"type":"git","url":"https://github.com/dominictarr/connect-restreamer.git"},"license":"MIT","author":{"name":"Dominic Tarr","email":"dominic.tarr@gmail.com","url":"http://bit.ly/dominictarr"},"gitHead":"2eb8f0639916acc69b5b1c44515d91d2c34d78fe","bugs":{"url":"https://github.com/dominictarr/connect-restreamer/issues"},"_id":"connect-restreamer@1.0.1","scripts":{},"_shasum":"3eb3093da34094fbfd24720779acdaabb80a4155","_from":".","_npmVersion":"1.4.26","_npmUser":{"name":"dominictarr","email":"dominic.tarr@gmail.com"},"maintainers":[{"name":"dominictarr","email":"dominic.tarr@gmail.com"}],"dist":{"shasum":"3eb3093da34094fbfd24720779acdaabb80a4155","tarball":"https://registry.npmjs.org/connect-restreamer/-/connect-restreamer-1.0.1.tgz","integrity":"sha512-cN1dBOgOtx/ei85EtZ6z9MNnGsWYUYevzJLHM7ICgIHCIg9aKuTBAfNEf5+gVpNPACi0P0cwDqnHrJOb3k9qlg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDtdKeuuDD/kmL2JCtHBhuesu6u9dX8+Qj0USfAkYrGvwIhAMWPClxsYdjkBqexxBCpzrzA7fkR4QGcUqxKw2jamjbN"}]}},"1.0.2":{"name":"connect-restreamer","version":"1.0.2","description":"re-stream a parsed body so that it can be proxied.","homepage":"http://github.com/dominictarr/connect-restreamer","repository":{"type":"git","url":"https://github.com/dominictarr/connect-restreamer.git"},"license":"MIT","author":{"name":"Dominic Tarr","email":"dominic.tarr@gmail.com","url":"http://bit.ly/dominictarr"},"gitHead":"4bb14849ace076fa006d8e713c755d719176ac70","bugs":{"url":"https://github.com/dominictarr/connect-restreamer/issues"},"_id":"connect-restreamer@1.0.2","scripts":{},"_shasum":"51dcc63860c4320aef1e72b137123f7653bfe397","_from":".","_npmVersion":"2.7.3","_nodeVersion":"0.10.21","_npmUser":{"name":"ngourley","email":"ngourley@gmail.com"},"maintainers":[{"name":"ngourley","email":"ngourley@gmail.com"}],"dist":{"shasum":"51dcc63860c4320aef1e72b137123f7653bfe397","tarball":"https://registry.npmjs.org/connect-restreamer/-/connect-restreamer-1.0.2.tgz","integrity":"sha512-OS/559rnZFQkaA4wxAqffBwS7h+xdzrpSMymJs4Xxc/YOacZ3cwqvU1qir0tot/KTWb0nILWyU23t8WVxUYoOA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCjZs5xrH5EW267kbMNSK8A+Bx3XhiJXHk6+hRuHNf73gIhAJRpTazQwxlokrf78imgJeZZK12xkxvCZ5KolKhqKkFB"}]}},"1.0.3":{"name":"connect-restreamer","version":"1.0.3","description":"re-stream a parsed body so that it can be proxied.","homepage":"http://github.com/dominictarr/connect-restreamer","repository":{"type":"git","url":"https://github.com/dominictarr/connect-restreamer.git"},"license":"MIT","author":{"name":"Dominic Tarr","email":"dominic.tarr@gmail.com","url":"http://bit.ly/dominictarr"},"gitHead":"314037673dd5b110ed43b8392f64a61740336d1b","bugs":{"url":"https://github.com/dominictarr/connect-restreamer/issues"},"_id":"connect-restreamer@1.0.3","scripts":{},"_shasum":"a73f04d88e7292d7fd2f2d7d691a0cdeeed141a9","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"ngourley","email":"ngourley@gmail.com"},"maintainers":[{"name":"ngourley","email":"ngourley@gmail.com"}],"dist":{"shasum":"a73f04d88e7292d7fd2f2d7d691a0cdeeed141a9","tarball":"https://registry.npmjs.org/connect-restreamer/-/connect-restreamer-1.0.3.tgz","integrity":"sha512-PjUk5j8dQe1vzdYuS7STVvvjsh6ll23p+J1GTqMpj4A3ZeeCtSJ6Ag+YctUVbKW7bfof4yB7aFy3cvorbssFDA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDkJcAl4UStjtFCqHbFCpv2VEeC8Vilrahn18qI4LW10wIhAKyqtuXQY8Lb5eOfLLGUjhkvBACOMn9mGj6xMO5eh6xs"}]}}},"maintainers":[{"name":"ngourley","email":"ngourley@gmail.com"}],"time":{"modified":"2022-06-13T21:43:11.394Z","created":"2011-07-30T09:02:48.661Z","1.0.0":"2011-07-30T09:02:50.720Z","1.0.1":"2014-10-12T14:01:42.544Z","1.0.2":"2015-03-27T02:30:29.169Z","1.0.3":"2015-08-26T13:52:23.741Z"},"author":{"name":"Dominic Tarr","email":"dominic.tarr@gmail.com","url":"http://bit.ly/dominictarr"},"repository":{"type":"git","url":"https://github.com/dominictarr/connect-restreamer.git"},"readme":"#connect-restreamer\n\nconnect's bodyParser has a problem when using it with a proxy. It gobbles up all the\nbody events, so that the proxy doesn't see anything!\n\n`connect-restreamer` comes to the rescue by re-emitting the body to the proxy.\n\nit has defaults that make it suitable for use with connect's `bodyParser` but can be customized.\n\n## usage\n\njust include `connect-restreamer` in you're middleware chain after the bodyParser\n\n    var bodyParser = require('connect/lib/middleware/bodyParser')\n      , restreamer = require('connect-restreamer')\n\n    //don't worry about incoming contont type\n    //bodyParser.parse[''] = JSON.parse\n\n    require('http-proxy').createServer(\n      //refactor the body parser and re-streamer into a separate package\n      bodyParser(),\n      //body parser absorbs the data and end events before passing control to the next\n      // middleware. if we want to proxy it, we'll need to re-emit these events after \n      //passing control to the middleware.\n      require('connect-restreamer')(),\n      function (req,res, proxy) {\n        //custom proxy logic\n        //... see https://github.com/nodejitsu/node-http-proxy\n      }\n    ).listen(80)\n\n\n## customization\n\nrestreamer takes 3 options:\n\n    var options = {\n      modify: function(body) {\n        //a function that may modify the buffered property\n        return body\n      },\n      property: 'body', //name of the buffered property\n      stringify:JSON.stringify //function to turn the buffered object back into a string\n    }\n\n   require('connect-restreamer')(options)\n","homepage":"http://github.com/dominictarr/connect-restreamer","bugs":{"url":"https://github.com/dominictarr/connect-restreamer/issues"},"license":"MIT","readmeFilename":"readme.markdown"}