goext/ginext/commonMiddlewares.go

13 lines
241 B
Go
Raw Permalink Normal View History

2023-08-03 09:09:27 +02:00
package ginext
import (
"github.com/gin-gonic/gin"
"gogs.mikescher.com/BlackForestBytes/goext/dataext"
)
2023-08-08 16:05:44 +02:00
func BodyBuffer(g *gin.Context) {
if g.Request.Body != nil {
g.Request.Body = dataext.NewBufferedReadCloser(g.Request.Body)
2023-08-03 09:09:27 +02:00
}
}