-
-
Notifications
You must be signed in to change notification settings - Fork 133
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
Support http.request flushHeaders #439
Comments
That's interesting, I didn't know you could trigger the request by As of now, I'm wondering if |
A bit of digging around.
|
A bit more context from the docs:
|
I think I understand how
This considered, implementing a full support for With
As I shared in the linked comment, this is possible but will require some internal refactoring to achieve. |
@mikicho, do you happen to know how Nock supports |
Thanks for the info! Very insightful!
I didn't dig into it, but it seems like it starts the playback, which I THINK eventually emits an |
I think you're right. Nock seems to check if the socket connection has been established, if it hasn't, it sets an internal flag to start the playback as soon as it does. If it has, it just starts the playback, which eventually calls I wonder how would Nock handled scenarios such as writing to request body after I believe it's rather a big semantic difference between:
I want to lean toward the former, to be honest. But in the context of |
I think we can implement Step 1: Emit
|
Released: v0.32.0 🎉This has been released in v0.32.0! Make sure to always update to the latest version ( Predictable release automation by @ossjs/release. |
flushHeaders
should kickstart the request (same asend
): https://nodejs.org/api/http.html#requestflushheadersNock test: https://github.com/nock/nock/blob/main/tests/test_intercept.js#L964
The text was updated successfully, but these errors were encountered: