-
Notifications
You must be signed in to change notification settings - Fork 613
Closed
Description
Many function handlers expect us to return either nothing or a Promise:
(res: HttpResponse, req: HttpRequest) => void | Promise<void>
This applies to various handlers, including HTTP method handlers, App listen/filter, and WebSocket upgrade/open/message/dropped.
Should we return a Promise that resolves once we've responded to the client?
Does it perform any cleanup or optimization with that Promise?
If its just to indicate that we can respond asynchronously, I believe it may be misleading, and we should change the signature to:
(res: HttpResponse, req: HttpRequest) => void
Metadata
Metadata
Assignees
Labels
No labels