Why is PHP saying "undefined index request"? The json format looks completely correct to me.
let json = JSON.stringify(
{ request: "getUser" },
{ username: "test" }
);
const response = await axios.post('http://localhost/projects/serverFiles/index.php', json);
My PHP
<?php
ini_set("log_errors", 1);
header('Access-Control-Allow-Origin: *');
header('Content-Type: application/json');
echo print_r($_POST["request"]);
?>