Vue-resource: how can i cancel a request ?

Created on 4 May 2016  路  2Comments  路  Source: pagekit/vue-resource

I cant find a way to get the xhr object in vue resource plugin of vuejs...
and i cant find anything on Documentation that tackles on that matter...

There is a beforeSend Method that i can play with, but im clueless on how to cancel the request...

Also there is an interceptors global function... but i can see any use of it... on my problem...

My problem is i wanna cancel a pending request ...

is there a way i can tapped on xhr object? so i can use xhr.abort?

if none can someone guide me how i can cancel this request...

ive been stuck for more than 10 hrs looking for an answer...

Most helpful comment

Check out https://github.com/vuejs/vue-resource/blob/master/docs/recipes.md#abort-a-request, but make sure to use v0.9.0 because the Request.abort() method was added in this release.

All 2 comments

Check out https://github.com/vuejs/vue-resource/blob/master/docs/recipes.md#abort-a-request, but make sure to use v0.9.0 because the Request.abort() method was added in this release.

Check out https://github.com/vuejs/vue-resource/blob/master/docs/recipes.md#abort-a-request, but make sure to use v0.9.0 because the Request.abort() method was added in this release.

Ussing this way can solve 'GET' request. is there sames to 'POST' or 'jsonp' request?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

V-Tom picture V-Tom  路  3Comments

yozman picture yozman  路  6Comments

christophwolff picture christophwolff  路  6Comments

Jigsaw5279 picture Jigsaw5279  路  5Comments

Creabine picture Creabine  路  3Comments