Skip to content
Discussion options

You must be logged in to vote

Should we return a Promise that resolves once we've responded to the client?

No

Does it perform any cleanup or optimization with that Promise?

No

If its just to indicate that we can respond asynchronously,

Yes

I believe it may be misleading, and we should change the signature to:
(res: HttpResponse, req: HttpRequest) => void

No, that's not right. async function seemingly returning void actually returns Promise<void> so we need to accept both signatures

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@RatchetS2
Comment options

Answer selected by uNetworkingAB
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #1188 on September 16, 2025 15:29.