function postexample(req, res) {
    var data1 = req.body.data1 == undefined ? null :req.body.data1;
    var data2 = req.body.data2 == undefined ? null :req.body.data2;

    res.json({"Message":data1+"-"+data2+" Posted!!!"});
}
//method to get the data from the request and pass to db method-POST
method to get the data from the request and pass to db method-POST
method to get the data from the request and pass to db method - POST
function postexample(req, res) {
    var data1 = req.body.data1 == undefined ? null :req.body.data1;
    var data2 = req.body.data2 == undefined ? null :req.body.data2;
    res.json({"Message":data1+"-"+data2+" Posted!!!"});
}
function postexample ( req , res ) { var data1 = req . body . data1 == undefined ? null : req . body . data1 ; var data2 = req . body . data2 == undefined ? null : req . body . data2 ; res . json ( { "Message" : data1 + "-" + data2 + " Posted!!!" } ) ; }
method to get the data from the request and pass to db method-POST
method to get the data from the request and pass to db method - POST