-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Type of request
property in RequestEvent
is incorrect
#3681
Comments
Yep, this is an unfortunate quirk of |
We don't want to use |
FWIW Well for those humans (like me), there's Request which works fantastically with a simple JS wrapper, running in a compiled C++ binary bundled with node, it's not only not a dependency, it's not even really JS (just the simple wrapper part). Edit: I added a gist of an old CJS wrapper function I keep using that could replace what you use from the node-fetch library in a few lines of JS (or TS). https://gist.github.com/jeremybradbury/cf049bf7aa6447e284bf07c923601c0d Then I made some edits to address goals and concerns discussed here: #3384 Some say don't reinvent the wheel... I say build custom rims when you can make them better (code that works and can be maintained without a PR, waiting for updates, workarounds or "just dealing with it") & cheaper (less operating costs, time spent, lines of code). Other libraries can make maintaining a library really hard. So in this case, when one isn't even needed, it seems to be doing more harm than good. |
The value of using We'll continue to use |
no it cannot, not without some modifications and planning. but in about 50 lines it handles any get/post binary/files/json/text streams or files of any kind. anyway you'll likely need your own tooling for processing & rendering streaming (binary) results from a firehose, which I know is a highly anticipated feature. I personally don't think anyway, i only offered an idea that solves 2 (or more) problems. starting with a possible new feature & later considering it for replacement after some testing and API work, seems like a logical path.
for sure, use what you think is best. i'm just some dude on the internet. i wasn't expecting you to use my code, just explain what I meant by pointing at it like a document. sorry for the tangent which was mostly unrelated to this particular thread, but also a possible solution here. |
Closing this in favour of #3419 |
Describe the bug
When I try to call
getReader()
onevent.request.body
in ahandle
function, I receive an error:response.body.getReader is not a function
, even though autocompletion suggests that it should be possible.Reproduction
See the log outputs after clicking on
Test Request
https://stackblitz.com/edit/svelte-kit-p42fqc?file=src/hooks.ts
Logs
No response
System Info
Severity
annoyance
Additional Information
No response
The text was updated successfully, but these errors were encountered: