firebase / firebase-admin-node

Firebase Admin Node.js SDK
https://firebase.google.com/docs/admin/setup
Apache License 2.0
1.64k stars 372 forks source link

[FR] allow to abort using AbortSignal #2137

Open rluvaton opened 1 year ago

rluvaton commented 1 year ago

Describe the solution you'd like when sending push notifications using the messaging module, I would like to be able to pass AbortSignal so that I can abort the request with it

google-oss-bot commented 1 year ago

I found a few problems with this issue:

chong-shao commented 1 year ago

Hello @rluvaton , thanks for filing the feature request. I'd like to know more about the feature. My current understanding is:

Is my understanding correct? If so I think our backend cannot support it due to various reasons.

rluvaton commented 1 year ago

What I mean is that we should be able to pass to every API function here (e.g. sending push notification) an AbortSignal that will propagate to the request call (should be part of the options)

https://github.com/firebase/firebase-admin-node/blob/b7de8a1330f6a32c11a7dc590b6775fde45ebb39/src/utils/api-request.ts#L487

NodeJS Docs | http.request signal param