Open mybigman opened 2 weeks ago
Hey! That is a feature I really liked to have as well. Unfortunately, these two are hard coded into the standard library.
Not Found: https://github.com/golang/go/blob/master/src/net/http/server.go#L2250
Not Allowed: https://github.com/golang/go/blob/master/src/net/http/server.go#L2625-L2627
Grape, being a wrapper around stdlib, has no ways to set them directly. I will try creating a PR to make these two dynamic. With any luck, we may have this feature in future Go releases. That's a long shot though.
theres a few routers you might be able to get an idea from that do this.
https://github.com/yousuf64/shift https://github.com/uptrace/bunrouter https://github.com/razonyang/fastrouter https://github.com/nbari/violetear
I appreciate your suggestion, although all of these packages are implementing the routing themselves. Grape, on the other hand, relies on the standard library for the routing. Hence, some features depend on the flexibility of stdlib's APIs.
can you add the ability to set these?