FR: add the ability to pass abort signal to httpsCallable
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
});
Any update on this one?
This is more relevant with Angular than ever, with the new resource functionality. Please consider implementing this.
Yes, this would be super useful for some use-cases to just cancel blocking network calls, even if the underlying firebase functions can't actually be cancelled once running.