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

Router support for dynamic routes like /user/:id #139

Open
VelinGeorgiev opened this issue Nov 8, 2024 · 1 comment
Open

Router support for dynamic routes like /user/:id #139

VelinGeorgiev opened this issue Nov 8, 2024 · 1 comment

Comments

@VelinGeorgiev
Copy link

First this is amazing project!

If it possible for the router to support dynamic paths like /user/:id where id is dynamic value.

I could not find example illustrating this functionality.

Thanks!

@sudomaxime
Copy link

Check out this example:
https://github.com/zigzap/zap/blob/master/examples/endpoint/userweb.zig#L61

Create an endpoint and verify if your endpoint configuration is shorter than the provided path. After that, it’s up to you to ensure the value type matches your expectations; otherwise, you should send back an error message.

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