v0.0.237 parse application/x-www-form-urlencoded in ginext
This commit is contained in:
parent
029b408749
commit
f0881c9fd6
@ -92,6 +92,14 @@ func (pctx PreContext) Start() (*AppContext, *gin.Context, *HTTPResponse) {
|
|||||||
Build()
|
Build()
|
||||||
return nil, nil, langext.Ptr(Error(err))
|
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 {
|
} else {
|
||||||
err := exerr.New(exerr.TypeBindFailFormData, "missing form body").
|
err := exerr.New(exerr.TypeBindFailFormData, "missing form body").
|
||||||
Str("struct_type", fmt.Sprintf("%T", pctx.form)).
|
Str("struct_type", fmt.Sprintf("%T", pctx.form)).
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
package goext
|
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"
|
||||||
|
Loading…
Reference in New Issue
Block a user