1
0
mirror of https://github.com/labstack/echo.git synced 2025-01-24 03:16:14 +02:00
echo/engine/fasthttp/request.go
Vishal Rana 688293b5ed v2 is compiling now
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-01-28 23:46:11 -08:00

46 lines
719 B
Go

package fasthttp
import "io"
import (
"github.com/labstack/echo/engine"
"github.com/valyala/fasthttp"
)
type (
Request struct {
context *fasthttp.RequestCtx
url engine.URL
header engine.Header
}
)
func (r *Request) Header() engine.Header {
return r.header
}
func (r *Request) RemoteAddress() string {
return r.context.RemoteAddr().String()
}
func (r *Request) Method() string {
return string(r.context.Method())
}
func (r *Request) URI() string {
return string(r.context.RequestURI())
}
func (r *Request) URL() engine.URL {
return r.url
}
func (r *Request) Body() io.ReadCloser {
// return r.context.PostBody()
return nil
}
func (r *Request) FormValue(name string) string {
return ""
}