Middleware
Write a custom middleware
- Middleware to collect request count, statuses and uptime.
- Middleware to write custom
Serverheader to the response.
Server
cookbook/middleware/server.go
loading...
Response
Headers
Content-Length:122
Content-Type:application/json; charset=utf-8
Date:2016年4月14日 20:31:46 GMT
Server:Echo/3.0
Body
{
"uptime":"2016年04月14日T13:28:48.486548936-07:00",
"requestCount":5,
"statuses":{
"200":4,
"404":1
}
}