Pode
Pode copied to clipboard
Multiple Methods support on Routes
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.