上下文

    获取到*Request对象。

    Forms()

    可以获取表单提交内容,具体参见

    Cookies()

    获取到Cookies对象并进行操作。

    SecureCookies()

    获取到安全Cookie对象并进行操作。

    发送Json数据到浏览器

    ServeXml()

    发送Xml数据到浏览器

    Download()

    下载某个文件

    SaveToFile()

    将上传文件保存到本地磁盘

    Params()

    如果执行体是结构体,则返回当前执行的结构体对象。否则返回nil。

    Redirect()

    重定向

    NotModified()

    返回304

    Unauthorized()

    返回未认证

    自定义错误返回