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

Multiple Methods support on Routes #996

Closed
Badgerati opened this issue Jun 28, 2022 · 0 comments · Fixed by #1070
Closed

Multiple Methods support on Routes #996

Badgerati opened this issue Jun 28, 2022 · 0 comments · Fixed by #1070

Comments

@Badgerati
Copy link
Owner

Describe the Change

Add support on Add-PodeRoute for multiple values on -Method to be supplied, making it easier to create a Route that works on multiple Methods - much like how -EndpointName works.

For example, this will create a [GET] /users and [POST] /users route, that share a scriptblock:

Add-PodeRoute -Method Get, Post -Path '/users' -ScriptBlock {}

If you need to know the method used, then it will be in $WebEvent.Method in the scriptblock.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant