( - , - - jquery, node, express), :
, , , malloc ( № 1), , , jquery json .
# 2 null --> "null" . , , , (.. , json), - . , /.
, , , :
:
$.post({
url: 'user/' + id,
data: {workaround: JSON.stringify(data)},
success: function(response){
console.log(response);
}
});
:
app.post('/user/:id', function(req,res){
var id = req.params.id;
var data = JSON.parse(req.body.workaround);
console.log(data);
});
If I find time, I will investigate and try to publish a bug report somewhere (this is a problem when you do not know whose error it is ...), try to do this as well.
davin source
share