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: keep RequestInit for treaty2 and add tests #76

Merged
merged 5 commits into from
Apr 23, 2024

Conversation

hranum
Copy link
Contributor

@hranum hranum commented Apr 5, 2024

Issue: elysiajs/elysia#590

When using URL Endpoint with treaty2 the "fetch" object is being deleted for GET/HEAD requests and not passed to the fetcher.

if (isGetOrHead) delete fetchInit.body

This patch moves the RequestInit out of body and merges it with the "FetchRequestInit" object before "body" is deleted.

image

@SaltyAom SaltyAom merged commit df6cff0 into elysiajs:main Apr 23, 2024
1 check failed
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