diff --git a/context.go b/context.go index b640b83..c9cab19 100644 --- a/context.go +++ b/context.go @@ -41,6 +41,14 @@ func (this *Context) Abort() { this.aborted = true } +func (this *Context) Method() string { + return this.r.Method +} + +func (this *Context) GetRemoteAddr() string { + return q5.GetRequestRemoteAddr(this.r) +} + func (this *Context) Request(name string) *q5.XValue { return q5.Request(this.r, name) } @@ -72,6 +80,10 @@ func (this *Context) ResponseOk() { q5.ResponseOk(this.w) } +func (this *Context) ResponseInt32Ok(key string, val int32) { + q5.ResponseInt32Ok(this.w, key, val) +} + func (this *Context) Set(key string, val interface{}) { if this.userData == nil { this.userData = make(map[string]interface{})