goext/ginext/commonMiddlewares.go
Mike Schwörer 55ff89f179
Some checks failed
Build Docker and Deploy / Run goext test-suite (push) Has been cancelled
v0.0.572 switch to git.blackforestbytes.com as module name
2025-05-03 16:43:59 +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)
}
}