nitro
nitro copied to clipboard
fix(aws-lambda-streaming): handle additional XMLHttpRequestBodyInit types
Open to feedback as I'm sure this isn't the most elegant way to handle this, however it did resolve the issue I was experiencing in the linked issue.
๐ Linked issue
#2613
โ Type of change
- [ ] ๐ Documentation (updates to the documentation, readme, or JSdoc annotations)
- [x] ๐ Bug fix (a non-breaking change that fixes an issue)
- [ ] ๐ Enhancement (improving an existing functionality like performance)
- [ ] โจ New feature (a non-breaking change that adds functionality)
- [ ] ๐งน Chore (updates to the build process or auxiliary tools and libraries)
- [ ] โ ๏ธ Breaking change (fix or feature that would cause existing functionality to change)
๐ Description
I would get the error reader.getReader is not a function
whenever I tried to redirect from a SolidStart api route - the request body returned by nitroApp.localCall can be of type ReadableStream
or XMLHttpRequestBodyInit
, the latter was not being handled which was causing the error.
๐ Checklist
- [x] I have linked an issue or discussion.
- [ ] I have updated the documentation accordingly.