I have the following code:
jQuery.ajax({
type: "POST",
async: true,
url: '/index/city',
data: {massiv: 'qweqwe'},
dataType: "json",
contentType: "application/json; charset=utf-8",
success: function (msg)
{ alert('success') },
error: function (err)
{ console.log(err.responseText);}
});
And the following code on php side:
var_dump($_POST);
When I run it I get blank $_POST array. However, with firebug I can clearly see that I send POST query massiv=qweqwe. IF I run query with GET type, I can see it in $_GET array without any problems.
There is nothing in nginx and php-fpm logs.
I have found workaround using $.post, instead of $.ajax