-
Notifications
You must be signed in to change notification settings - Fork 4
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
TokenRouter needs explicit GET when POST is used #1
Comments
Posted by @gerardtoconnor I'll look into this, thanks for raising. The issue relates to it being able to partially match the non-filtered root before realizing it's a dead-end but there may have been a route possible in filtered routes earlier in the tree. There are a few ways to fix but I want to make sure it's performant & clean so please bear with me and use the explicit route filtering as you have for now thanks. |
Posted by @gerardtoconnor @forki I know breaking changes are annoying but when I created the method filter functions I overlooked the fact that many people like to do filter as last leg in chain eg: router notfound [
subRoute "/api" [
subRoute "/hey" [
GET f1
POST f2
]
POSTGRP [
route "/there" f3
]
] So I am wondering how I handle it and if I have two separate functions for each method eg for
not changing anything yet but along with this bug fix want to make sure fixes against this issue as router notfound [
subRoute "/api" [
GET [
route "/hey" f1
]
POST [
route "/hey" f2
]
POST [
route "/there" f3
]
] Is bit repetitive and frustrating for user having to write |
This seems to be more generalized than that. I just hit an issue where I had a (FWIW, I'd be fine with an API change if necessary; as a manager I used to work with liked to say, "We reserve the right to get smarter." :) ) |
Given there is always a verb required with list being relatively stable, rather then grouping, I was thinking of instead adopting the Saturn function naming scheme of |
Originally created by @forki in giraffe-fsharp/Giraffe#158
Reminder for @gerardtoconnor ;-)
sent you actual routes in screenshot. It's along the lines of:
not working. but following is:
The text was updated successfully, but these errors were encountered: