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

FR: add the ability to pass abort signal to httpsCallable #3055

Open
makoffd opened this issue May 13, 2020 · 1 comment
Open

FR: add the ability to pass abort signal to httpsCallable #3055

makoffd opened this issue May 13, 2020 · 1 comment

Comments

@makoffd
Copy link

makoffd commented May 13, 2020

Describe your environment

  • Operating System version: macOs Catalina 10.15.4
  • Browser version: Google Chrome 81.0.4044.129
  • Firebase SDK version: 7.14.3
  • Firebase Product: functions

Describe the problem

It's impossible to cancel the httpsCallable call in response to some user event e.g. button click.
The proposed solution is to pass down the abort signal to the fetch invocation as described in MDN AbortSignal docs. The signal parameter could be a part of HttpsCallableOptions.

Relevant Code:

interface HttpsCallableOptions {
    timeout?: number;
    signal?: AbortSignal;
}

const controller = new AbortController();
const abortSignal = controller.signal;

functions.httpsCallable('myFirebaseFunction', {
    signal: abortSignal
});
@somq
Copy link

somq commented Nov 17, 2023

Any update on this one?

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

4 participants