This commit is contained in:
aozhiwei 2021-01-07 10:52:58 +08:00
parent b4b8898e11
commit 17a44afd7c

View File

@ -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{})