mirror of
https://github.com/labstack/echo.git
synced 2025-12-01 22:51:17 +02:00
@@ -163,9 +163,9 @@ h := func(*echo.Context) *HTTPError {
|
||||
e.Get("/users/:id", h)
|
||||
```
|
||||
|
||||
## (Middleware)[https://github.com/labstack/echo/tree/master/examples/middleware]
|
||||
## Middleware
|
||||
|
||||
*WIP*
|
||||
[*WIP*](https://github.com/labstack/echo/tree/master/examples/middleware)
|
||||
|
||||
## Response
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ func main() {
|
||||
e := echo.New()
|
||||
|
||||
// Middleware
|
||||
e.Use(mw.Logger)
|
||||
e.Use(mw.Logger())
|
||||
|
||||
// Routes
|
||||
e.Get("/", hello)
|
||||
@@ -78,7 +78,7 @@ func main() {
|
||||
|
||||
`echo.New()` returns a new instance of Echo.
|
||||
|
||||
`e.Use(mw.Logger)` adds logging middleware to the chain. It logs every HTTP request
|
||||
`e.Use(mw.Logger())` adds logging middleware to the chain. It logs every HTTP request
|
||||
made to the server, producing output
|
||||
|
||||
```sh
|
||||
|
||||
Reference in New Issue
Block a user