Open
Description
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
});