升级body解析, 适配各个类型请求Body #12

Merged
zhangdeman merged 4 commits from feature/upgrade_request_parse into master 2025-05-04 15:34:02 +08:00
Showing only changes of commit d725815ce7 - Show all commits

View File

@ -55,7 +55,7 @@ func Execute(ctx *gin.Context, receiver any) ([]byte, error) {
return nil, errors.New(contentType + " : content_type format error")
}
// 裁剪出真实的类型,之所以截取,是因为 content_type 中可能还包含编码信息, 如 : application/json;charset=utf8
contentType = contentTypeArr[0]
contentType = contentTypeFormatArr[1]
if _, exist := requestBodyParseAdaptorTable[contentType]; !exist {
return nil, errors.New(contentType + " : adaptor not found")
}