mirror of
https://github.com/labstack/echo.git
synced 2025-01-10 00:28:23 +02:00
0731959a98
Signed-off-by: Vishal Rana <vr@labstack.com>
50 lines
781 B
Go
50 lines
781 B
Go
package fasthttp
|
|
|
|
import "io"
|
|
|
|
import (
|
|
"github.com/labstack/echo/engine"
|
|
"github.com/valyala/fasthttp"
|
|
)
|
|
|
|
type (
|
|
Request struct {
|
|
request *fasthttp.RequestCtx
|
|
url engine.URL
|
|
header engine.Header
|
|
}
|
|
)
|
|
|
|
func (r *Request) Object() interface{} {
|
|
return r.request
|
|
}
|
|
|
|
func (r *Request) URI() string {
|
|
return string(r.request.RequestURI())
|
|
}
|
|
|
|
func (r *Request) URL() engine.URL {
|
|
return r.url
|
|
}
|
|
|
|
func (r *Request) Header() engine.Header {
|
|
return r.header
|
|
}
|
|
|
|
func (r *Request) RemoteAddress() string {
|
|
return r.request.RemoteAddr().String()
|
|
}
|
|
|
|
func (r *Request) Method() string {
|
|
return string(r.request.Method())
|
|
}
|
|
|
|
func (r *Request) Body() io.ReadCloser {
|
|
// return r.context.PostBody()
|
|
return nil
|
|
}
|
|
|
|
func (r *Request) FormValue(name string) string {
|
|
return ""
|
|
}
|