From 40121cf3739ec86b067273ccb491864cb58552d9 Mon Sep 17 00:00:00 2001 From: Raju Ahmed Date: Sun, 11 Jan 2026 00:50:31 +0600 Subject: [PATCH] fix: use WriteHeader for json response status code --- context.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/context.go b/context.go index 67e83181c..c95be39f1 100644 --- a/context.go +++ b/context.go @@ -501,7 +501,7 @@ func (c *context) jsonPBlob(code int, callback string, i any) (err error) { func (c *context) json(code int, i any, indent string) error { c.writeContentType(MIMEApplicationJSON) - c.response.Status = code + c.response.WriteHeader(code) return c.echo.JSONSerializer.Serialize(c, i, indent) }