mirror of
https://github.com/gin-gonic/gin.git
synced 2026-07-10 21:06:00 +08:00
Compare commits
2 Commits
883ca6bdec
...
cc5f3c4e12
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cc5f3c4e12 | ||
|
|
051e9100ac |
@ -1020,7 +1020,7 @@ func (c *Context) Status(code int) {
|
||||
// Header is an intelligent shortcut for c.Writer.Header().Set(key, value).
|
||||
// It writes a header in the response.
|
||||
// If value == "", this method removes the header `c.Writer.Header().Del(key)`
|
||||
func (c *Context) Header(key, value string) {
|
||||
func (c *Context) SetHeader(key, value string) {
|
||||
if value == "" {
|
||||
c.Writer.Header().Del(key)
|
||||
return
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user