forked from goffee/core
start cookie session
This commit is contained in:
parent
465e88bf40
commit
2bffdcdcf7
5 changed files with 275 additions and 7 deletions
|
|
@ -72,6 +72,15 @@ func (c *Context) GetHeader(key string) string {
|
|||
return c.Request.httpRequest.Header.Get(key)
|
||||
}
|
||||
|
||||
func (c *Context) GetCookie() (UserCookie, error) {
|
||||
|
||||
user, err := GetCookie(c.Request.httpRequest)
|
||||
if err != nil {
|
||||
return user, err
|
||||
}
|
||||
return user, nil
|
||||
}
|
||||
|
||||
func (c *Context) GetUploadedFile(name string) *UploadedFileInfo {
|
||||
file, fileHeader, err := c.Request.httpRequest.FormFile(name)
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue