I'm trying to make an AJAX call in Vue to a PHP script, but it doesn't seem to be working.
Vue:
methods: {
onSubmit () {
if (this.valid) {
this.$http.post('http://remindwordserver.loc/register.php', {test: 'test'}).then(response => {
console.log(response.body)
}, response => {})
}
}
},
PHP:
`<?php
print_r($_POST);`
$_POST
is empty
What am I doing wrong?