Per route api extensions (#542)

* Extend extension mechanism to support per-route API extensions

* Tidy up comment

* Remove print statement

* Minor improvement to README

* Avoid calling c.Request.Context() twice
This commit is contained in:
Nigel Deakin
2017-11-29 12:03:23 +00:00
committed by GitHub
parent 4f72a1201f
commit 9a75785cbf
5 changed files with 80 additions and 7 deletions

View File

@@ -363,7 +363,7 @@ func (s *Server) bindHandlers(ctx context.Context) {
apps.GET("/routes", s.handleRouteList)
apps.POST("/routes", s.handleRoutesPostPutPatch)
apps.GET("/routes/*route", s.handleRouteGet)
apps.GET("/routes/:route", s.handleRouteGet)
apps.PATCH("/routes/*route", s.handleRoutesPostPutPatch)
apps.PUT("/routes/*route", s.handleRoutesPostPutPatch)
apps.DELETE("/routes/*route", s.handleRouteDelete)