Level 2
Had the exact same issue today and I worked on it for quite a while. Here is the solution:
http: {
emulateJSON: true,
emulateHTTP: true
}
2 likes
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I try a POST Request with Vue-Resource (with data):
Vue.http.post('subscribe', {email: this.email, hp: this.address}).then((val) => {
console.log(val);
});
But if i try to print_r($_POST), there is an empty array.
If i do this with jquery:
$.ajax({
url: 'subscribe',
type: 'post',
data: {
email: 'email',
name: 'name'
}
}).done(function(val) {
console.log(val);
})
It works fine :/
Please or to participate in this conversation.