mirror of
https://github.com/gin-gonic/gin.git
synced 2025-12-11 19:47:00 +08:00
Merge 051e9100ac85526d329dc049c2891d61921c6d20 into e88fc8927a52b74f55bec0351604a56ac0aa1c51
This commit is contained in:
commit
fa7bf57601
@ -1059,7 +1059,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