At the angular side i have passed data using post method.
var data = {
'id': mydata.google_id,
'token': mydata.token,
'email': mydata.email,
'name': mydata.name
};
$http.post('http://localhost:3000/login1',data,config)
.success(function (data, status, headers, config) { ... })
.error(function (data, status, header, config) { ... });
At server side tried to access the data i posted using req.body.id
but i couldn't
When i displayed the req.body
in console i obtained the following response:
{ ' {"id" : "1234" , "email" : "xyz@gmail.com" , "name" : "xyz"}' : ' ' [_proto_] : { } }
Help me to solve this error