MCPcopy
hub / github.com/gin-gonic/gin / Status

Method Status

context.go:1073–1075  ·  view source on GitHub ↗

Status sets the HTTP response code.

(code int)

Source from the content-addressed store, hash-verified

1071
1072// Status sets the HTTP response code.
1073func (c *Context) Status(code int) {
1074 c.Writer.WriteHeader(code)
1075}
1076
1077// Header is an intelligent shortcut for c.Writer.Header().Set(key, value).
1078// It writes a header in the response.

Callers 2

AbortWithStatusMethod · 0.95
RenderMethod · 0.95

Calls 1

WriteHeaderMethod · 0.45

Tested by

no test coverage detected