1
0
mirror of https://github.com/labstack/echo.git synced 2025-11-25 22:32:23 +02:00
Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
Vishal Rana
2016-03-28 06:57:31 -07:00
parent 28ec39daaa
commit f53eae10b3
4 changed files with 26 additions and 9 deletions

View File

@@ -25,12 +25,12 @@ func NewRequest(method, url string, body io.Reader) engine.Request {
}
}
func (r *Request) TLS() bool {
func (r *Request) IsTLS() bool {
return r.request.TLS != nil
}
func (r *Request) Scheme() string {
if r.TLS() {
if r.IsTLS() {
return "https"
}
return "http"
@@ -60,6 +60,10 @@ func (r *Request) Header() engine.Header {
// return r.request.ProtoMinor()
// }
func (r *Request) ContentLength() int {
return int(r.request.ContentLength)
}
func (r *Request) UserAgent() string {
return r.request.UserAgent()
}