nodejs express : json post example
in server-code :
router.post('/demo/api', function(req, res, next) {
req.accepts('application/json');
// input message handling
var json = req.body;
logger.info('name is :'+json.name);
logger.info('address is :'+json.address);
// output message
res.json({result:'success'});
});
TEST