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

Option to skip parsing #1009

Open
bogeychan opened this issue Jan 10, 2025 · 0 comments
Open

Option to skip parsing #1009

bogeychan opened this issue Jan 10, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@bogeychan
Copy link
Contributor

bogeychan commented Jan 10, 2025

What is the problem this feature would solve?

Some routes, as mentioned in the documentation, don't require automatic body parsing at all and break if it occurs because the body is used due to side effects introduced by plugins (i.e. how elysia works)

What is the feature you are proposing to solve the problem?

Allow parse: false option in the route's configuration, or reconsider parsing for plugins that don't access the body but Context

app.post("/", betterAuthView, {
  parse: false,
});

Allowing something like this should also improve performance

What alternatives have you considered?

I tried this, but it is inconsistent with aot: false, in some cases and bad UX:

app.post("/", betterAuthView, {
  parse: () => 0,
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant