nitro icon indicating copy to clipboard operation
nitro copied to clipboard

fix(aws-lambda-streaming): handle additional XMLHttpRequestBodyInit types

Open Jhinger opened this issue 7 months ago โ€ข 1 comments

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.

Jhinger avatar Jul 16 '24 04:07 Jhinger