node.js - Getting the post data in connect route -


i have code uses connect acts server , handles post data.how query post data response.below code

    connectroute = require('connect-route'),     connect = require('connect'),     app = connect();    .use(connectroute(function (router) {     router.post('/aaaa', function (req, res, next) {     global.post_value='';             //postmethod=req.method;             var postdata = '';             req.addlistener('data', function(chunk)             {                 postdata += chunk;              });              req.addlistener('end', function()             {                  global.post_value=postdata;               });                 a(req,res);         }) 

can global.post_value across different functions? if change if there multiple requests nodejs server? stuck here helpful


Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -