-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'end' or 'close' event or callback for response #6
Comments
@eugef I noticed that the response.end() callback you find in the official Node.js docs https://nodejs.org/docs/latest-v12.x/api/http.html#http_response_end_data_encoding_callback is not triggered. Is it possible to have the mock response object mimick the native response on this matter? |
Hi @GiordanoArman PR is always welcome. Meanwhile you can manually trigger
|
@eugef ok, thanks, would you rather have this fix on a fork of the 1.x branch or master branch? |
Master branch |
ok, great :) will this fix be released in a 1.x version or when you release version 2? |
I assume this feature won't introduce a breaking change, so it would be possible to release as a minor version. |
ok, do you perhaps need to add me as collaborator somehow in order for me to push the changes? I'm stuck with auth errors, whether I use personal tokens or SSH keys... been a while since last time I used GitHub via command line lol |
Hi @GiordanoArman, please fork the repo and do all the changes there, Then you can create a PR https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork |
The example in the readme assumes that the response is sync. Since I'm testing a wrapper around an actual http API, the response is async, so I need an event or callback. Neither "end" nor "close" seem to get emitted, and I don't think I'm missing something, since the end method doesn't bother.
I can provide a patch, but would like to get confirmation that it would get merged etc.
The text was updated successfully, but these errors were encountered: