mirror of
https://github.com/kataras/iris.git
synced 2026-01-09 21:15:56 +00:00
Give read access to the current route, a feature that many of you asked for
Former-commit-id: 39295ac1331ee08d3047c84f5c8ea152bce96781
This commit is contained in:
@@ -34,6 +34,14 @@ type Application interface {
|
||||
// It is ready to use after Build state.
|
||||
ServeHTTP(w http.ResponseWriter, r *http.Request)
|
||||
|
||||
// GetRouteReadOnly returns the registered "read-only" route based on its name, otherwise nil.
|
||||
// One note: "routeName" should be case-sensitive. Used by the context to get the current route.
|
||||
// It returns an interface instead to reduce wrong usage and to keep the decoupled design between
|
||||
// the context and the routes.
|
||||
//
|
||||
// Look core/router/APIBuilder#GetRoute for more.
|
||||
GetRouteReadOnly(routeName string) RouteReadOnly
|
||||
|
||||
// FireErrorCode executes an error http status code handler
|
||||
// based on the context's status code.
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user