Issue reading HTTP request body from a JSON POST in PHP
It turns out that I just needed
$inputJSON = file_get_contents('php://input');
$input = json_decode($inputJSON, TRUE); //convert JSON into array
where the second parameter in json_decode
returned the object as an array.
Even when the following works.
$inputJSON = file_get_contents('php://input');
If you want to continue using $_POST send the data as FormData
var fd = new FormData();
fd.append('key', 'value');
return axios.post('url', fd)