const bodyFormData = new FormData();
bodyFormData.set('data', JSON.stringify({
url: this.url,
test: 'test'
}));
axios({
method: 'post',
url: '/ajax/data.php',
data: bodyFormData,
})
axios.post(
'/ajax/data.php',
'data=' + JSON.stringify({
url: this.url,
test: 'test'
})
)
$data = json_decode( html_entity_decode( stripslashes ($_POST['data']) ) );
echo json_encode($data);