I need to pass an array via POST , I tried as follows:
const params = new URLSearchParams();
params.append('pagamentos', this.variavel_array);
axios.post('grava_pedido_pdv.php', params);
The variable variavel_array
contains the value {'nome' : 'victor', 'cod' : 1}
, however, in the console I view it as " payload: " and I can not read this value in PHP .