1
0
Fork 0
Yet another HTTP router. But this one allows any combinations of regular and param segments for a path.
Go to file
Alexander Andreev 5d7d595df3
Init repo!
2023-05-26 04:06:35 +04:00
.gitignore Init repo! 2023-05-26 04:06:35 +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
go.mod Init repo! 2023-05-26 04:06:35 +04:00
httpr.go Init repo! 2023-05-26 04:06:35 +04:00

README.md

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.