Add a missing call for fallbackHandler

Former-commit-id: a1ce94b39d326657cdbce34276477c34752f0000
This commit is contained in:
ZaniaDevelopper 2018-02-23 09:24:35 +03:00
parent 1196680004
commit abb10e9cbf

View File

@ -7,6 +7,9 @@ import (
func main() { func main() {
app := iris.New() app := iris.New()
// add a fallback handler to process requests that would not be declared in the router.
app.Fallback(fallbackHandler)
// this works as expected now, // this works as expected now,
// will handle *all* expect DELETE requests, even if there is no routes // will handle *all* expect DELETE requests, even if there is no routes
app.Get("/action/{p}", h) app.Get("/action/{p}", h)