diff --git a/request/parse_body/execute.go b/request/parse_body/execute.go index 8f68fc3..e404d1d 100644 --- a/request/parse_body/execute.go +++ b/request/parse_body/execute.go @@ -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") }