Page:
Context
Pages
Actions
Basicauth
Binding
Captcha
Compress
Context
Debug
Dispatch
ErrHandler
Events
Flash
Forms
Group
Handler
Home
Injection
Logger
Params
QuickStart
Recovery
Renders
Return
Router
Session
Static
Tango
Tpongo2
Xsrf
ZH_Actions
ZH_Basicauth
ZH_Binding
ZH_Captcha
ZH_Compress
ZH_Context
ZH_Debug
ZH_Dispatch
ZH_ErrHandler
ZH_Events
ZH_Flash
ZH_Forms
ZH_Group
ZH_HOME
ZH_Handler
ZH_Injection
ZH_Logger
ZH_Params
ZH_Recovery
ZH_Renders
ZH_Return
ZH_Router
ZH_Session
ZH_Static
ZH_Tango
ZH_Tpongo2
ZH_Xsrf
2
Context
Lunny Xiao edited this page 2015-08-28 15:29:28 +08:00
Context
Context has many convenient method for complete your work.
Req()
Get *Request object.
Forms()
Get query value by query key. See Forms
Cookies()
Get Cookies object.
SecureCookies()
Get secure Cookies.
ServeFile()
Send file to web browser.
ServeJson()
Send Json to web browser.
ServeXml()
Send Xml to web browser.
Download()
Download some file.
SaveToFile()
Save uploaded file to disk file.
Params()
Get router's matched params.
Action()
If executor is a struct, then return the pointer of struct, or return nil.
Redirect()
Write redirect to web browser.
NotModified()
Return 304.
Unauthorized()
Return unauthorized.
NotFound()
Return 404
Abort()
Return customized error.