mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-14 12:12:12 +08:00
Merge 051e9100ac85526d329dc049c2891d61921c6d20 into 077a2f39c85700ba0823f85ed29cec0c8f2cbdfc
This commit is contained in:
commit
ef3fc13153
@ -1003,7 +1003,7 @@ func (c *Context) Status(code int) {
|
|||||||
// Header is an intelligent shortcut for c.Writer.Header().Set(key, value).
|
// Header is an intelligent shortcut for c.Writer.Header().Set(key, value).
|
||||||
// It writes a header in the response.
|
// It writes a header in the response.
|
||||||
// If value == "", this method removes the header `c.Writer.Header().Del(key)`
|
// 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 == "" {
|
if value == "" {
|
||||||
c.Writer.Header().Del(key)
|
c.Writer.Header().Del(key)
|
||||||
return
|
return
|
||||||
|
Loading…
x
Reference in New Issue
Block a user