$.ajax({
url: 'http://api.domen.ru/dir',
type: 'POST',
contentType: 'application/json',
data: JSON.stringify({
name: 'some name'
})
});
location /dir {
log_format postdata $request_body;
access_log /var/log/nginx/access.log postdata;
echo_read_request_body;
}