-
Notifications
You must be signed in to change notification settings - Fork 839
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cancel a request when cached data is available #926
Labels
Comments
Change var defer = $q.defer();
defer.reject();
httpConfig.timeout = defer; to var defer = $q.defer();
defer.resolve();
httpConfig.timeout = defer.promise; Example here http://jsfiddle.net/q9qyox50/14/ |
The request is cancelled but the cached data is not sent. Any suggestions? |
I wrote example, using decorator for $http, that caching request promise to prevent multiple request to the same url |
To review & update docs. |
Will update docs with referenced issue #1391 |
bostrom
added a commit
that referenced
this issue
Dec 30, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I would like to send a request and have Restangular intercept and resolve the request if cached data is available. This may be related to #589 but I came up with a jsfiddle which demos how I'm attempting to do this:
http://jsfiddle.net/astrism/q9qyox50/13/
The request is still made when the code runs. Any ideas?
The text was updated successfully, but these errors were encountered: