i used this.$http({method: 'POST'}) to fix. but i hope "this.$http.post" can be used
I have the same problem
I solved the problem for myself
i change root paramener:
from Vue.http.options.root = '/ajax'
to Vue.http.options.root = '/en/ajax'
it seems that the problem is not the plugin :)
This question was answerd here: https://github.com/vuejs/vue-resource/issues/15
All post data is send as application/json by default, if you want to send as form-data can enable this option
So in order for that to work, you need to set the emulateJSON option to true. For example:
this.$http.post('http://example.com', data, {emulateJSON:true}).then(function(res){
// Do something with the response
});
Why was this closed? I am getting the same issue, and I don't see a proper solution. If I use this.$http.post I expect to see a POST request being sent out, not a GET request.
Why should we leave the issue open after two months?
If you see this problem, please provide a reproduction, with the concrete version that was used.
Fair enough! I notice this only happens on urls without FQDNs and without http/https scheme
http://jsfiddle.net/vjvMp/568/
http://i.imgur.com/DahzRUw.jpg
Version 1.0.2
Thanks for this! We will look it!
I have the same problem:
this.$http.post('/api/autos', this.formatFormData()) - send GET request
The problem was solved by adding / to the end of request url
this.$http.post('/api/autos/', this.formatFormData()) - send POST request
Most helpful comment
This question was answerd here: https://github.com/vuejs/vue-resource/issues/15
So in order for that to work, you need to set the
emulateJSONoption totrue. For example: