RouteInfo returns current request route information. Method, Path, Name and params if they exist for matched route. RouteInfo returns generic "empty" struct for these cases: * Context is accessed before Routing is done. For example inside Pre middlewares (`e.Pre()`) * Router did not find matching r
()
| 273 | // * Router did not find matching route - 404 (route not found) |
| 274 | // * Router did not find matching route with same method - 405 (method not allowed) |
| 275 | func (c *Context) RouteInfo() RouteInfo { |
| 276 | if c.route != nil { |
| 277 | return c.route.Clone() |
| 278 | } |
| 279 | return RouteInfo{} |
| 280 | } |
| 281 | |
| 282 | // Param returns path parameter by name. |
| 283 | func (c *Context) Param(name string) string { |