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.
Activity
[-]isFinished property on http response object[/-][+]response.finished ambiguity[/+]ronag commentedon Jun 24, 2019
Actually, currently, there is as far as I can see no way to check whether a response has completed without attaching an early event listener.
ronag commentedon Dec 28, 2019
finished is deprecated