This commit is contained in:
2023-08-08 16:05:44 +02:00
parent 87a004e577
commit 655d4daad9
3 changed files with 6 additions and 8 deletions

View File

@@ -5,10 +5,8 @@ import (
"gogs.mikescher.com/BlackForestBytes/goext/dataext"
)
func BodyBuffer() gin.HandlerFunc {
return func(g *gin.Context) {
if g.Request.Body != nil {
g.Request.Body = dataext.NewBufferedReadCloser(g.Request.Body)
}
func BodyBuffer(g *gin.Context) {
if g.Request.Body != nil {
g.Request.Body = dataext.NewBufferedReadCloser(g.Request.Body)
}
}