Skip to content

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

Open
@makoffd

Description

@makoffd

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions