mirror of
https://github.com/kataras/iris.git
synced 2025-12-18 02:17:05 +00:00
Add fallback handlers
Former-commit-id: f7e9bd17076a10e1ed1702780d7ce9e89f00b592
This commit is contained in:
@@ -147,6 +147,11 @@ func (router *Router) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
router.mainHandler(w, r)
|
||||
}
|
||||
|
||||
// RouteExists checks if a route exists
|
||||
func (router *Router) RouteExists(method, path string, ctx context.Context) bool {
|
||||
return router.requestHandler.RouteExists(method, path, ctx)
|
||||
}
|
||||
|
||||
type wrapper struct {
|
||||
router http.HandlerFunc // http.HandlerFunc to catch the CURRENT state of its .ServeHTTP on case of future change.
|
||||
wrapperFunc func(http.ResponseWriter, *http.Request, http.HandlerFunc)
|
||||
|
||||
Reference in New Issue
Block a user