1
0
mirror of https://github.com/astaxie/beego.git synced 2025-07-06 10:20:18 +00:00

add session support

This commit is contained in:
xiemengjun
2013-01-01 23:11:15 +08:00
parent 1f67fcb0f9
commit 1530e3fbc2
2 changed files with 45 additions and 0 deletions

View File

@ -4,6 +4,7 @@ import (
"bytes"
"encoding/json"
"encoding/xml"
"github.com/astaxie/session"
"html/template"
"io/ioutil"
"net/http"
@ -151,3 +152,8 @@ func (c *Controller) Input() url.Values {
c.Ctx.Request.ParseForm()
return c.Ctx.Request.Form
}
func (c *Controller) StartSession() (sess session.Session) {
sess = GlobalSessions.SessionStart(c.Ctx.ResponseWriter, c.Ctx.Request)
return
}