How do I use this.$http.post wihtout redirect in a method of a Vue component?

133 Views Asked by At

I request from a method in a Vue component with this.$http (from https://github.com/pagekit/vue-resource) like this:

this.$http.post("/some/url", data).then(response => { ... })

In some cases the response may have status code 302 Found and I want to process it in the callback in then. But instead the this.$http.post follows the location URL provided by the first response that is not desired. How do I force this.$http.post not to redirect?

0

There are 0 best solutions below