1
0
mirror of https://github.com/labstack/echo.git synced 2025-12-07 23:12:43 +02:00

Object method to get real object

Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
Vishal Rana
2016-02-08 16:48:03 -08:00
parent 3f48b92c5d
commit 0731959a98
10 changed files with 55 additions and 41 deletions

View File

@@ -29,13 +29,13 @@ func NewServer(c *engine.Config, h engine.HandlerFunc, l logger.Logger) *Server
func (s *Server) Start() {
fasthttp.ListenAndServe(s.config.Address, func(ctx *fasthttp.RequestCtx) {
req := &Request{
context: ctx,
request: ctx,
url: &URL{ctx.URI()},
header: &RequestHeader{ctx.Request.Header},
}
res := &Response{
context: ctx,
header: &ResponseHeader{ctx.Response.Header},
response: ctx,
header: &ResponseHeader{ctx.Response.Header},
}
s.handler(req, res)
})