diff --git a/context.go b/context.go index df001a40..ea532545 100644 --- a/context.go +++ b/context.go @@ -390,6 +390,12 @@ func (c *Context) Header(key, value string) { } } +// GetHeader is a shortcut for c.Request.Header.Get(key) +// It gets the header in the request. +func (c *Context) GetHeader(key string) string { + return c.Request.Header.Get(key) +} + func (c *Context) SetCookie( name string, value string,