-
Notifications
You must be signed in to change notification settings - Fork 1.6k
this.$http.post can't execute #613
Comments
I have similar problem. |
Same problem here. Cannot set post option. |
Same issue here. Any luck on figuring out what we're doing wrong? |
Yeah. I've figured it out for myself: It is easier to use plain XMLHttpRequest. |
So I’m not sure if this is a solution but after I ran into this problem with vue-resource, I tried axios. When the same issue arose with axios, I read up some more and found a solution. It would seem that the POST data (body) needs to be submitted as a string. So where you would ordinarily do: {var1: 47, var2: “foo”} you would instead provide: ‘var1=47&var2=“foo”’ It may be worth a shot to try with vue-resource. |
Figured it out, its the API that needs accept the headers in the cors header. |
follow is my code .
I want to add my images .there are three param : photo_name, photo_path ,status. follow is my post
but in my response and JSON .there is wrong
so i use ajax . follow is my code
it is ok and success. but why vue-resource can't do it ?
The text was updated successfully, but these errors were encountered: