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:
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user