-
-
Notifications
You must be signed in to change notification settings - Fork 757
Closed
Labels
Description
Moving from (#19)
Coming with [email protected] and new event.handled flag it is possible to take over h3 response mechanism and send streams. For Workers, we can check res._body property existence. Direct fetch in unenv (src) passes the body as is.
This way we can implement sendStream with the minimum possible changes. Once tested enough and working for common presets, I plan to add this as a built-in (nitro/h3) utility.
Example usage: https://github.com/unjs/nitro-deploys/blob/main/routes/stream.ts
Working deployments:
- Cloudflare workers: https://nitro-deployment.pi0.workers.dev/stream
- Netlify functions: https://nitro-deployment-edge.netlify.app/stream
- Vercel edge: https://nitro-app-edge.vercel.app/stream
Screen.Recording.2023-06-21.at.02.56.44.mov
danielroe, Hebilicious, dosstx, franklin-tina, rodrigo-fantuci and 5 moredanielroe, Hebilicious, dosstx, franklin-tina, misaon and 3 moresadeghbarati, danielroe, enemy-senator92, TheAlexLichter, atinux and 4 moreAndrewBogdanovTSS