Skip to content

Commit

Permalink
feat: add Status method to Context for setting response status
Browse files Browse the repository at this point in the history
  • Loading branch information
i9si authored Jan 28, 2025
2 parents f8c2650 + fcd6611 commit df0a976
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions context.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,11 @@ func (c *Context) SendStatus(status int) error {
return c.Response.SendStatus(status)
}

func (c *Context) Status(statusCode int) *Context {
c.Response = c.Response.Status(statusCode)
return c
}

func (c *Context) Send(data []byte) error {
return c.Response.Send(data)
}
Expand Down

0 comments on commit df0a976

Please sign in to comment.