You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, there is no intuitive way to check if a response actually has "finished". The current finished property just means that the user has "finished" (i.e. called end()) not that the response itself has finished, i.e. has either emitted finish or error (or close), which is what I believe is the currently assumed behavior by many developers (even Node veterans).
However, changing this behavior now would be a rather significant breaking change. Instead, I suggest adding a closed property similar to what already exists in the http/2 API which I believe would better fulfill the expected functionality.
Currently, there is no intuitive way to check if a response actually has "finished". The current
finished
property just means that the user has "finished" (i.e. calledend()
) not that the response itself has finished, i.e. has either emittedfinish
orerror
(orclose
), which is what I believe is the currently assumed behavior by many developers (even Node veterans).However, changing this behavior now would be a rather significant breaking change. Instead, I suggest adding a
closed
property similar to what already exists in the http/2 API which I believe would better fulfill the expected functionality.Thoughts?
Refs:
#28411
#24347
jshttp/on-finished#30
jshttp/on-finished#31
The text was updated successfully, but these errors were encountered: