Middleware represents a component in the request pipeline that operates on the raw request/response level. It executes before and after the handler chain but has no access to the structured Result.
| 18 | // on the raw request/response level. It executes before and after the |
| 19 | // handler chain but has no access to the structured Result. |
| 20 | type Middleware interface { |
| 21 | Invoke(ctx *Context, next RequestDelegate) error |
| 22 | } |
| 23 | |
| 24 | // routingMiddleware is responsible for matching the incoming request |
| 25 | // to a registered endpoint. It runs early in the pipeline so that |
no outgoing calls
no test coverage detected