Axios Envía Post a PHP
var params = new URLSearchParams();
params.append('param1', 'value1');
params.append('param2', 'value2');
axios.post('/foo', params);
feddynventor
var params = new URLSearchParams();
params.append('param1', 'value1');
params.append('param2', 'value2');
axios.post('/foo', params);
<?php
$rp = json_decode(file_get_contents('php://input'), true);
// JS
axios.post(url, JSON.stringify({
name: "this.name",
email: "this.psswrd"
}))
// PHP
$_POST = json_decode(array_keys($_POST)[0], true);