{"_id":"express-summon-route","_rev":"30-ed82fb4df4513c74c8761d8a44d5dfb0","name":"express-summon-route","description":"A utility to call an express route from within another route","dist-tags":{"latest":"0.0.5"},"versions":{"0.0.0":{"name":"express-summon-route","version":"0.0.0","description":"A utility to call an express route from within another route","main":"lib/express.summon.route.js","scripts":{"test":"mocha"},"repository":{"type":"git","url":"git://github.com/shawnhilgart/express-summon-route.git"},"keywords":["Express","Router"],"devDependencies":{"mocha":"*","express":"~3.0.0"},"author":{"name":"=","email":"shawn@wcst.com"},"license":"BSD-2-Clause","bugs":{"url":"https://github.com/shawnhilgart/express-summon-route/issues"},"homepage":"https://github.com/shawnhilgart/express-summon-route","directories":{"test":"test"},"dependencies":{"express":"~3.0.6"},"_id":"express-summon-route@0.0.0","dist":{"shasum":"efe01a9ac580beaf697ee25a3228b7be9b9a743c","tarball":"https://registry.npmjs.org/express-summon-route/-/express-summon-route-0.0.0.tgz","integrity":"sha512-XdShbxizEvaifcTc6xW4DCunxIZIJV904IdLP68MZ6HCHliM55MAoe8UIw6yM5AYLzQ+1b/ZqIr/qZIym5AWPQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFB3RNIAhh/xJ1E3Cx0PwJFY7gOZfDz1yb61yMaiz42UAiBwUd/BCiotMuROnVrb7jSLY5zd4vqfyB17zt8iAQJXKA=="}]},"_from":".","_npmVersion":"1.3.14","_npmUser":{"name":"shawnhilgart","email":"shawn@wcst.com"},"maintainers":[{"name":"shawnhilgart","email":"shawn@wcst.com"}]},"0.0.1":{"name":"express-summon-route","version":"0.0.1","description":"A utility to call an express route from within another route","main":"lib/express.summon.route.js","scripts":{"test":"mocha"},"repository":{"type":"git","url":"git://github.com/shawnhilgart/express-summon-route.git"},"keywords":["Express","Router"],"devDependencies":{"mocha":"*","express":"~3.0.0"},"author":{"name":"=","email":"shawn@wcst.com"},"license":"BSD-2-Clause","bugs":{"url":"https://github.com/shawnhilgart/express-summon-route/issues"},"homepage":"https://github.com/shawnhilgart/express-summon-route","directories":{"test":"test"},"dependencies":{"express":"~3.0.6"},"_id":"express-summon-route@0.0.1","dist":{"shasum":"eff9c29a98cdd510a3f52cd9e3e1413fa9441ff6","tarball":"https://registry.npmjs.org/express-summon-route/-/express-summon-route-0.0.1.tgz","integrity":"sha512-p4xGK+jt7Ottn09g1h8P0qcqtukRPHKNFAEZVszFqrSzHwF3REoAJ2sWawEpszdr5qfuac1g3eoTDx6DlFvmkg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC/ArbtweFWqHM59QHfu/0yHKAnIBAZni8TdGaBgBcojAIhAIRbDdepI4TOIbKww0iu+ldEWdT3g8YWyZuj0BcIkeuu"}]},"_from":".","_npmVersion":"1.3.14","_npmUser":{"name":"shawnhilgart","email":"shawn@wcst.com"},"maintainers":[{"name":"shawnhilgart","email":"shawn@wcst.com"}]},"0.0.3":{"name":"express-summon-route","version":"0.0.3","description":"A utility to call an express route from within another route","main":"lib/express.summon.route.js","scripts":{"test":"mocha"},"repository":{"type":"git","url":"git://github.com/shawnhilgart/express-summon-route.git"},"keywords":["Express","Router"],"devDependencies":{"mocha":"*","express":"~3.0.0"},"author":{"name":"=","email":"shawn@wcst.com"},"license":"BSD-2-Clause","bugs":{"url":"https://github.com/shawnhilgart/express-summon-route/issues"},"homepage":"https://github.com/shawnhilgart/express-summon-route","directories":{"test":"test"},"dependencies":{"express":"~3.0.6"},"_id":"express-summon-route@0.0.3","dist":{"shasum":"c05197f4d543c06ccf564550d8f985f1d94593bd","tarball":"https://registry.npmjs.org/express-summon-route/-/express-summon-route-0.0.3.tgz","integrity":"sha512-xboWQx1cgQ7vJP5I0VD/JORSPgNQlcW4anR6t+aAOFOLEbHP2A+SMsM+vM8t4EXVULxLrSrSYYIeey0BOm/1ww==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEMCICLfXA9VLQUmW6UQIWpmP/Ncyesa+/V7q+4JZ+H9a7N7Ah9owuuA+7dSLTQpy46RU6DEdNhv/WeMuUfKd3X9Kns0"}]},"_from":"./","_npmVersion":"1.3.14","_npmUser":{"name":"shawnhilgart","email":"shawn@wcst.com"},"maintainers":[{"name":"shawnhilgart","email":"shawn@wcst.com"}]},"0.0.4":{"name":"express-summon-route","version":"0.0.4","description":"A utility to call an express route from within another route","main":"lib/express.summon.route.js","scripts":{"test":"mocha"},"repository":{"type":"git","url":"git://github.com/shawnhilgart/express-summon-route.git"},"keywords":["Express","Router"],"devDependencies":{"mocha":"*","express":"~3.0.6"},"author":{"name":"=","email":"shawn@wcst.com"},"license":"BSD-2-Clause","bugs":{"url":"https://github.com/shawnhilgart/express-summon-route/issues"},"homepage":"https://github.com/shawnhilgart/express-summon-route","directories":{"test":"test"},"dependencies":{},"_id":"express-summon-route@0.0.4","dist":{"shasum":"5aa8070de84704fe2d3fdee8fc0cffe4b2dfc346","tarball":"https://registry.npmjs.org/express-summon-route/-/express-summon-route-0.0.4.tgz","integrity":"sha512-sB4+tc3Lq8Q/y9DDGJDolv69fcexiIlzYpncZ1kT4QFJNUkL3mQfu+ExmE8Q5aeDO64JYwR2uPbd8eiXufkV+w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD5zWufmNzHLJ5bbW2rr+CdIyNbmU2W2nBrA/BPStgC5AIgQ5NUxOfhpK9PBIXkWFSBewbBtCtxcjWUrVXDmruLcpE="}]},"_from":"./","_npmVersion":"1.3.14","_npmUser":{"name":"shawnhilgart","email":"shawn@wcst.com"},"maintainers":[{"name":"shawnhilgart","email":"shawn@wcst.com"}]},"0.0.5":{"name":"express-summon-route","version":"0.0.5","description":"A utility to call an express route from within another route","main":"lib/express.summon.route.js","scripts":{"test":"mocha"},"repository":{"type":"git","url":"git://github.com/shawnhilgart/express-summon-route.git"},"keywords":["Express","Router"],"devDependencies":{"mocha":"*","express":"~3.0.6"},"author":{"name":"=","email":"shawn@wcst.com"},"license":"BSD-2-Clause","bugs":{"url":"https://github.com/shawnhilgart/express-summon-route/issues"},"homepage":"https://github.com/shawnhilgart/express-summon-route","directories":{"test":"test"},"dependencies":{},"_id":"express-summon-route@0.0.5","dist":{"shasum":"212065deb1b4cedf74067a224dea16e16becae86","tarball":"https://registry.npmjs.org/express-summon-route/-/express-summon-route-0.0.5.tgz","integrity":"sha512-fYE2meHe3SGtwUo/mdWij+7j9lCrpEiMCDBeiaa+3/+EjweWQhnq1yWn4odLgW3CFgwLSYY27DPfqfCIXdalKA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEZedVI0ro3J53d/9h52OarW/e3Kcz5eg/ZwGpAnJ+KQAiA90eYgwiuhPMJIPRr+FvOAyTk6qF6sggccnfCywRIWbg=="}]},"_from":"./","_npmVersion":"1.3.14","_npmUser":{"name":"shawnhilgart","email":"shawn@wcst.com"},"maintainers":[{"name":"shawnhilgart","email":"shawn@wcst.com"}]}},"readme":"express-summon-route\n====================\n\nA utility to call an express route from within another route\n\n\n##Usage\n\nRight now the utility supports routes registered through the get, post, put, and delete http verbs as well as any middleware registered through the app.use function. summon.route returns an instance of a request to be piped through the express/connect request cycle that can be executed by calling .execute(callback).\n\n### Basic Usage\n\nInvoke a get request, and run through middleware\n\n```\nvar express = require('express');\nvar summon = require('express-summon-route');\nvar app = new express();\n\nsummon.use(app, express); // need to pass an instance of app to summon, and express library\napp.use(function(req, res, next) {\n    res.set('x-header-mine','test-header'); // middleware\n    next();\n})\n\napp.get('/test-route', function(req, res) {\n    res.send(200, \"Hello World!\"); \n});\n\nsummon.route('/test-route','GET').execute(function(code, result, response) {\n    console.log(result); // outputs Hello World!\n    console.log(response.get('x-header-mine')); // outputs test-header\n    console.log(code); // 200 \n});\n```\n\n### Post Data Usage\n\nInvoke a POST request, and run through middleware\n\n```\nvar express = require('express');\nvar summon = require('express-summon-route');\nvar app = new express();\n\nsummon.use(app, express); // need to pass an instance of app to summon, and express library\n\napp.post('/test-route', function(req, res) {\n    res.send(200, req.body.myParam); \n});\n\nsummon.route('/test-route','POST').addBody({myParam:'qBit'}).execute(function(code, result, response) {\n    console.log(result); // outputs qBit!\n    console.log(code); // 200 \n});\n```\n\n##Caveats\n\nThis library might not work with all middleware because it sends a modified request and response object through express. I will continue to test and find situations where the library may not perform as expected. File and Cookie support are next on the list for compatability. \n\n\n","maintainers":[{"email":"shawn@andgoodwork.com","name":"shawnhilgart"}],"time":{"modified":"2022-06-17T22:41:52.473Z","created":"2014-03-23T19:17:19.637Z","0.0.0":"2014-03-23T19:17:40.667Z","0.0.1":"2014-03-23T19:18:17.659Z","0.0.3":"2014-03-23T20:28:33.078Z","0.0.4":"2014-03-23T21:37:58.040Z","0.0.5":"2014-03-26T03:29:46.420Z"},"readmeFilename":"README.md","homepage":"https://github.com/shawnhilgart/express-summon-route","keywords":["Express","Router"],"repository":{"type":"git","url":"git://github.com/shawnhilgart/express-summon-route.git"},"author":{"name":"=","email":"shawn@wcst.com"},"bugs":{"url":"https://github.com/shawnhilgart/express-summon-route/issues"},"license":"BSD-2-Clause","users":{"natarajanmca11":true,"aminadav":true}}