2👍
✅
You could try something like this:
let ongoingRequest
export default {
beforeDestroy() {
ongoingRequest.abort()
},
methods: {
getdata() {
this.$http.get("users", {
before(request) {
ongoingRequest = request
}
}).then((res) => {
///do stuff with returned data
})
}
}
}
I found an issue talking about that here.
Source:stackexchange.com