Sometimes i get report that in jQuery Ajax query $_POST is empty. For example Google Chrome on OS X or Windows 7 Firefox sometimes the post is empty sometime it isn't. I can't figure out what seems to be the problem
jQuery.ajax({
url: "ajax.php",
method: "POST",
data: {
jqueryAjaxPostData: JSON.stringify({
name: "gen",
id: 1
})
},
processData: true,
dataType: "json",
failure: function ()
{
alert("Ajax failure")
}
});
EDITED : There is PHP code
$post = Variable::toArray(json_decode($this->Http->post("jqueryAjaxPostData")));