3 ms·
httprouter is unforgiving with routes. IIRC, having both of these routes are not allowed /users/:id /users/create Seems like a common use case.
by mmgutz 10y ago
httprouter is unforgiving with routes. IIRC, having both of these routes are not allowed
/users/:id
/users/create
Seems like a common use case.
- peterkieltyka 10y agoInteresting.. and btw, pressly/chi supports those routes easily, among many other combinations. Chi was designed to be very composeable with middlewares, subrouters and handlers. The idea is to consider the request passing through a "flow" of layers, handling and building the response along the way. This makes it easier to reason and organize each piece separately and then connect it all together.