NewContext returns a new Context instance. Note: both request and response can be left to nil as Echo.ServeHTTP will call c.Reset(req,resp) anyway these arguments are useful when creating context for tests and cases like that.
(r *http.Request, w http.ResponseWriter)
| 412 | // Note: both request and response can be left to nil as Echo.ServeHTTP will call c.Reset(req,resp) anyway |
| 413 | // these arguments are useful when creating context for tests and cases like that. |
| 414 | func (e *Echo) NewContext(r *http.Request, w http.ResponseWriter) *Context { |
| 415 | return newContext(r, w, e) |
| 416 | } |
| 417 | |
| 418 | // Router returns the default router. |
| 419 | func (e *Echo) Router() Router { |