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
Request streaming comes handy where you have very large requests and you don't want to clutter your ram with whole request and wait for it to fully upload, this way you can start processing it right away.
I found this example for nodejs http server which might give you a better idea of how this could be used:
http.createServer(function(r,s){console.log(r.method,r.url,r.headers);varbody="";r.on('readable',function(){body+=r.read();// here instead of concatenation we could start processing data});r.on('end',function(){console.log(body);s.write("OK");s.end();});}).listen(42646);
This could be useful for any non-static adapter.
This would also allow creating proxy endpoints where body is streamed to another fetch request (related: #2227). This is helpful because application could have handful of services and you might want to hide and open only one (in this case the sveltekit) which does some processing (maybe authentication) and then passes that request to another service.
Describe the proposed solution
Obvious one is to pass request stream to endpoint. But I'm not sure how it would work with current solution where you have for example FormData parsing which expects for request to be fully loaded and only then endpoint can start doing it's thing.
Alternatives considered
No response
Importance
would make my life easier
Additional Information
No response
The text was updated successfully, but these errors were encountered:
Describe the problem
Request streaming comes handy where you have very large requests and you don't want to clutter your ram with whole request and wait for it to fully upload, this way you can start processing it right away.
I found this example for nodejs http server which might give you a better idea of how this could be used:
This could be useful for any non-static adapter.
This would also allow creating proxy endpoints where body is streamed to another fetch request (related: #2227). This is helpful because application could have handful of services and you might want to hide and open only one (in this case the sveltekit) which does some processing (maybe authentication) and then passes that request to another service.
Describe the proposed solution
Obvious one is to pass request stream to endpoint. But I'm not sure how it would work with current solution where you have for example FormData parsing which expects for request to be fully loaded and only then endpoint can start doing it's thing.
Alternatives considered
No response
Importance
would make my life easier
Additional Information
No response
The text was updated successfully, but these errors were encountered: