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

set duplex to 'half' #22

Merged
merged 2 commits into from
Feb 1, 2025
Merged

set duplex to 'half' #22

merged 2 commits into from
Feb 1, 2025

Conversation

Chuiantw1212
Copy link
Contributor

@Chuiantw1212 Chuiantw1212 commented Jan 25, 2025

According to the message, RequestInit: duplex option is required when sending a body, line 48 will always trigger the error if the duplex attribute is not set.

I tried sending a POST request from the client without any body or headers, but the error still occurred. In the case above, the keyword content-type does not exist anywhere, leaving the duplex attribute undefined.

The error stopped only when I deleted line 48, which I believe is crucial and should not be removed. Setting duplex to always 'half' seems to work.

I understand that duplex is a lab feature and may change in the future, but for now, this patch allows me to build something under development using Elysia Node.

image

image

image

According to the message RequestInit: duplex option is required when sending a body
@eliellis
Copy link

eliellis commented Jan 26, 2025

duplex: "half" seems to always be required, according to this line here, which references this issue stating as much

@SaltyAom SaltyAom merged commit fe00d71 into elysiajs:main Feb 1, 2025
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.

3 participants