mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-17 14:12:16 +08:00
GetHeader() add return string
This commit is contained in:
parent
617e515646
commit
c5c0d535b6
@ -392,7 +392,7 @@ func (c *Context) Header(key, value string) {
|
|||||||
|
|
||||||
// GetHeader is a shortcut for c.Request.Header.Get(key)
|
// GetHeader is a shortcut for c.Request.Header.Get(key)
|
||||||
// It gets the header in the request.
|
// It gets the header in the request.
|
||||||
func (c *Context) GetHeader(key string) {
|
func (c *Context) GetHeader(key string) string {
|
||||||
return c.Request.Header.Get(key)
|
return c.Request.Header.Get(key)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user