mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-20 00:02:16 +08:00
Use Writer in Context.Status
This commit is contained in:
parent
11407e73ad
commit
2ad52b5370
@ -711,7 +711,7 @@ func bodyAllowedForStatus(status int) bool {
|
|||||||
|
|
||||||
// Status sets the HTTP response code.
|
// Status sets the HTTP response code.
|
||||||
func (c *Context) Status(code int) {
|
func (c *Context) Status(code int) {
|
||||||
c.writermem.WriteHeader(code)
|
c.Writer.WriteHeader(code)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Header is a intelligent shortcut for c.Writer.Header().Set(key, value).
|
// Header is a intelligent shortcut for c.Writer.Header().Set(key, value).
|
||||||
|
Loading…
x
Reference in New Issue
Block a user