I try to send data to server with AJAX (pure JS). And I want to send it on the request body.
I know how to do it in jQuery:
$.ajax({
url: 'someurl',
data: 'foo'
});
What I mean is how I can send data to server like jQuery does when using ajax method with data attribute in pure js ?
Also, in PHP, how can I get this data?
I know that with laravel I need to do
Request::getContent();
(if I remember right)
But I don't know how to get this data in PHP.
Thanks