1
0
forked from apps/featurer

Basic HTTP servers (#2) and various improvements over docs.

This commit is contained in:
2024-10-12 23:07:49 +05:00
parent 0b5d3a2c37
commit 2ecfe7f8ac
17 changed files with 417 additions and 5 deletions

View File

@@ -0,0 +1,10 @@
package http
import (
"github.com/gin-gonic/gin"
)
func (h *http) ReplyJSON(ctx *gin.Context, statusCode int, data interface{}) {
ctx.Writer.Header().Add("Content-Type", "application/json")
ctx.JSON(statusCode, data)
}