Thinkjs的controller方法

属性controller.http

方法
controller.ip()
controller.method()
controller.isMethod(method)
controller.isGet()
controller.isPost()
controller.isAjax(method)
controller.isWebSocket()
controller.isCli()
controller.isJsonp(callback)
controller.get(name)
controller.post(name)
controller.param(name)
controller.file(name)
controller.header(name, value)
controller.expires(time)
controller.userAgent()
controller.referrer(onlyHost)
controller.cookie(name, value, options)
controller.session(name, value)
controller.lang(lang, asViewPath)
controller.locale(key)
controller.redirect(url, statusCode)
controller.assign(name, value)
controller.fetch(templateFile)
controller.display(templateFile)
controller.jsonp(data)
controller.json(data)
controller.status(status)
controller.deny(status)
controller.write(data, encoding)
controller.end(data, encoding)
controller.type(type, charset)
controller.download(filePath, contentType, fileName)
controller.success(data, message)
controller.fail(errno, errmsg, data)
controller.sendTime(name)

推荐阅读更多精彩内容