Skip to content
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

Make requests cancellable #21

Open
davidrapin opened this issue Mar 3, 2017 · 0 comments
Open

Make requests cancellable #21

davidrapin opened this issue Mar 3, 2017 · 0 comments

Comments

@davidrapin
Copy link
Contributor

Using the proposed /api/cancel endpoint, make all API calls cancellable.
see https://github.com/Linkurious/linkurious-server/issues/779

How

Add a cancellable boolean option to all option object of all requests
When options.cancellable is true:

  • generate a random cancellationToken and add it to the request parameters
  • add a cancellation handler in the request response promise chain (.then(onResolve, onFailure, onCancel))
  • if the promise is cancelled, use the generated cancellationToken to cancel the server-side query using the /api/cancel endoint
@francescoinfante francescoinfante added this to the v3.0.0 milestone Sep 6, 2019
@francescoinfante francescoinfante removed this from the v3.0.0 milestone Aug 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants