goext/ginext/commonMiddlewares.go
Mike Schwörer cb557cb319
Some checks failed
Build Docker and Deploy / Run goext test-suite (push) Has been cancelled
v0.0.572
2025-05-03 16:41:43 +02:00

13 lines
247 B
Go

package ginext
import (
"github.com/gin-gonic/gin"
"git.blackforestbytes.com/BlackForestBytes/goext/dataext"
)
func BodyBuffer(g *gin.Context) {
if g.Request.Body != nil {
g.Request.Body = dataext.NewBufferedReadCloser(g.Request.Body)
}
}