-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Stream request body instead of buffering it in memory #8084
Conversation
…mocks-http does not support the async iterable iterface for IncomingRequest.
🦋 Changeset detectedLatest commit: 85a28e0 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
// The duplex property is required when using a ReadableStream or async | ||
// iterable for the body. The type definitions do not include the duplex | ||
// property because they are not up-to-date. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there an updated version that matches the types?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is sadly no updated version with the correct types. There exists an issue DefinitelyTyped/DefinitelyTyped#60924 but no fix yet (see RequestInit type definition).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
I assume the failing check for windows-latest (node@16) (pull_request) is unrelated to the change. I just ran the tests locally on Windows and Node V16 and it passed. |
Yeah sorry about that. That particular test has been flaky. I re-ran it and will merge it once it passes. |
Changes
Testing
Docs