Answer the question
In order to leave comments, you need to log in
Why is $_POST empty (axios)?
Good afternoon. The problem is that when I send data via axios. In response, I get an empty $_POST.
request code
axios.post("/api.php?action=create", {myvalue:'строка', sub:'ahaha', value:22})
.then(function(response){
console.log('Что-то произошло');
if(response.data.error){
app.errorMessage = response.data.message;
console.log('ошибка');
} else{
console.log('отлично');
}
});
},
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question