diff --git a/ginext/preContext.go b/ginext/preContext.go index 8bc277f..bc6fc33 100644 --- a/ginext/preContext.go +++ b/ginext/preContext.go @@ -92,6 +92,14 @@ func (pctx PreContext) Start() (*AppContext, *gin.Context, *HTTPResponse) { Build() return nil, nil, langext.Ptr(Error(err)) } + } else if pctx.ginCtx.ContentType() == "application/x-www-form-urlencoded" { + if err := pctx.ginCtx.ShouldBindWith(pctx.form, binding.Form); err != nil { + err = exerr.Wrap(err, "Failed to read urlencoded-form"). + WithType(exerr.TypeBindFailFormData). + Str("struct_type", fmt.Sprintf("%T", pctx.form)). + Build() + return nil, nil, langext.Ptr(Error(err)) + } } else { err := exerr.New(exerr.TypeBindFailFormData, "missing form body"). Str("struct_type", fmt.Sprintf("%T", pctx.form)). diff --git a/goextVersion.go b/goextVersion.go index 4f0d359..f4d82c7 100644 --- a/goextVersion.go +++ b/goextVersion.go @@ -1,5 +1,5 @@ package goext -const GoextVersion = "0.0.236" +const GoextVersion = "0.0.237" -const GoextVersionTimestamp = "2023-08-09T17:48:06+0200" +const GoextVersionTimestamp = "2023-08-09T19:35:01+0200"