You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please provide source code and commit sha if you found a bug.
Review existing issues and provide feedback or react to them.
Description
I use context.Context.Json to set status code and response message, but I found the code is only set to code in context.Writer, but when I get status by using context.Status(), it only returns status from context.Writer.ResponseWriter's status
// JSON serializes the given struct as JSON into the response body.// It also sets the Content-Type as "application/json".func (c*Context) JSON(codeint, objany) {
c.Render(code, render.JSON{Data: obj})
}
c.Status() is only used to set the status and it does not return anything
// Status sets the HTTP response code.
func (c *Context) Status(code int) {
c.Writer.WriteHeader(code)
}
Description
I use context.Context.Json to set status code and response message, but I found the code is only set to code in context.Writer, but when I get status by using context.Status(), it only returns status from context.Writer.ResponseWriter's status
How to reproduce
Expectations
Actual result
Environment
The text was updated successfully, but these errors were encountered: