[performance] http response encoding / writing improvements (#2374)

This commit is contained in:
kim 2023-11-27 14:00:57 +00:00 committed by GitHub
commit 74700cc803
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
104 changed files with 526 additions and 267 deletions

View file

@ -110,5 +110,11 @@ func (m *Module) TokenPOSTHandler(c *gin.Context) {
c.Header("Cache-Control", "no-store")
c.Header("Pragma", "no-cache")
c.JSON(http.StatusOK, token)
apiutil.EncodeJSONResponse(
c.Writer,
c.Request,
http.StatusOK,
apiutil.AppJSON,
token,
)
}