So I have this code:
axios({ method: \'post\', url, headers: { \'Content-Type\': \'application/x-www-form-urlencoded\' }, data: { jso
var params = { data1: 'string', } axios.post(url, params).then(function(response) { //code here });
or
axios.post(url, {data1: 'string' }).then(function(response) { //code here });
api
$_POST = json_decode(file_get_contents("php://input"),true); echo $_POST['data1'];