Commit 189df128 authored by astaxie's avatar astaxie

fix #87

parent 8807c327
...@@ -262,7 +262,7 @@ func (c *Controller) GetString(key string) string { ...@@ -262,7 +262,7 @@ func (c *Controller) GetString(key string) string {
} }
func (c *Controller) GetStrings(key string) []string { func (c *Controller) GetStrings(key string) []string {
r := c.Ctx.Request; r := c.Ctx.Request
if r.Form == nil { if r.Form == nil {
return []string{} return []string{}
} }
...@@ -327,3 +327,7 @@ func (c *Controller) DelSession(name interface{}) { ...@@ -327,3 +327,7 @@ func (c *Controller) DelSession(name interface{}) {
} }
c.CruSession.Delete(name) c.CruSession.Delete(name)
} }
func (c *Controller) IsAjax() bool {
return (c.Ctx.Request.Header.Get("HTTP_X_REQUESTED_WITH") == "XMLHttpRequest")
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment