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

pre routing handler with body available (or a catch all route) #1815

Open
dahmadjid opened this issue Apr 9, 2024 · 2 comments
Open

pre routing handler with body available (or a catch all route) #1815

dahmadjid opened this issue Apr 9, 2024 · 2 comments

Comments

@dahmadjid
Copy link

I am trying to have a single handler that handles all incoming http requests regardless of path or method.
I couldnt find that a catch all route is supported. So i am using the pre_routing_handler. I found that the pre_routing_handler does not have the body available as that is read after the pre_routing_handler is done.

a solution would be:

  • adding set_pre_routing_handler_with_body
  • or a default_handler that gets routed to in case no other route is matched
@dahmadjid
Copy link
Author

I will be happy to do a pull request on either of them as they look straightforward enough to implement.

@yhirose
Copy link
Owner

yhirose commented Apr 12, 2024

@dahmadjid could you implement set_pre_routing_handler_with_body and some unit tests? Thanks!

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

No branches or pull requests

2 participants