Skip to content
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

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

Open
wants to merge 2 commits into
base: v2
Choose a base branch
from

Conversation

Jhinger
Copy link

@Jhinger Jhinger commented Jul 16, 2024

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)
  • 🐞 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

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@shunjilin
Copy link

Just to add, my team was in the process of upgrading our regular APIs to the stream-based API for certain routes that needed to support streams, and this fix works with the regular routes as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants