Created
June 21, 2016 14:47
-
-
Save BrockReece/7548b385bf49554b4af25f90c596b294 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this.$http.post(this.resource, data, { | |
beforeSend(xhr) { | |
if (this.lastRequest) { | |
this.lastRequest.cancel() | |
} | |
this.lastRequest = xhr | |
}, | |
}).then(response => { | |
//do something with request | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment