1
0
Fork 0
forked from goffee/core

start cookie session

This commit is contained in:
Zeni Kim 2024-09-30 09:12:38 -05:00
parent 465e88bf40
commit 2bffdcdcf7
5 changed files with 275 additions and 7 deletions

View file

@ -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 {