Asynchronous https firebase functions

后端 未结 4 1014
一整个雨季
一整个雨季 2021-01-15 06:15

Should HTTPS functions return asynchronous promises like realtime functions have to? We haven\'t been returning in HTTPS functions (just using res.status.send etc), and it l

4条回答
  •  一生所求
    2021-01-15 06:50

    HTTP functions currently do not respect returned promises - they require a sent result in order to terminate normally. If an HTTP function doesn't send a result, it will time out.

    All other types of functions require a returned promise in order to wait for asynchronous work to fully complete.

    If you don't have any async work to wait for, you can just return immediately.

    These are the three cases outlined in the docs.

提交回复
热议问题