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

Support using AbortController to cancel request to Gitlab? #3561

Open
2 tasks done
acherkashin opened this issue Mar 23, 2024 · 4 comments
Open
2 tasks done

Support using AbortController to cancel request to Gitlab? #3561

acherkashin opened this issue Mar 23, 2024 · 4 comments
Labels
type:feature Changes add a new feature

Comments

@acherkashin
Copy link

Description

I make request to new Gitlab().Users.showCurrentUser() to get current user.
I have cancel button in my UI. Is it possible to use native const controller = new AbortController() to abort the request to the server?

I think it would be useful for all the methods in the libarry.

Checklist

  • I have checked that this is not a duplicate issue.
  • I have read the documentation.
@jdalrymple
Copy link
Owner

That should be doable! Right now it uses AbortController under the hood to handle the queryTimeouts. I could expose it to do both query timeouts and external abort signals

@jdalrymple jdalrymple added type:feature Changes add a new feature and removed question labels Mar 25, 2024
@jdalrymple jdalrymple changed the title Is it possible to use AbortController to cancel request to Gitlab? Support using AbortController to cancel request to Gitlab? Mar 25, 2024
@acherkashin
Copy link
Author

@jdalrymple it would be great 👍

@jdalrymple
Copy link
Owner

Follow up, would you need this on a pure request basis, or on a library config basis. Im guessing the former, but hoping the later because its easier haha

@acherkashin
Copy link
Author

@jdalrymple Not sure how it can be implemented on library level, I think it is needed on request level.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature Changes add a new feature
Projects
None yet
Development

No branches or pull requests

2 participants