Yet another HTTP router. But this one allows any combinations of regular and param segments for a path.
Go to file
2023-05-28 01:49:21 +04:00
.gitignore Init repo! 2023-05-26 04:06:35 +04:00
go.mod Init repo! 2023-05-26 04:06:35 +04:00
httpr.go Made ServeStatic() to return an error. 2023-05-28 01:49:21 +04:00
LICENSE Initial commit 2023-05-26 01:50:54 +04:00
README.md Init repo! 2023-05-26 04:06:35 +04:00

httpr

It is an implementation of yet another HTTP router.

The reason why this router was made is to be able to have pretty paths with parameters and standard endpoints at the same level.

As an example here is a structure used in my another project (dwelling-upload):

GET /
POST /
GET /:hash/:name
POST /delete
DELETE /:hash
GET /assets/*filepath
GET /robots.txt
GET /favicon.svg

Previously I used httprouter and I had to have /f/:hash/:name route instead of just /:hash/:name because of collisions.