diff --git a/src/Horse.Jhonson.pas b/src/Horse.Jhonson.pas index 4fe8de4..6a6b76d 100644 --- a/src/Horse.Jhonson.pas +++ b/src/Horse.Jhonson.pas @@ -39,7 +39,7 @@ procedure Middleware(Req: THorseRequest; Res: THorseResponse; Next: {$IF DEFINED var LJSON: {$IF DEFINED(FPC)}TJsonData{$ELSE}TJSONValue{$ENDIF}; begin - if (Req.MethodType in [mtPost, mtPut, mtPatch]) and (Req.RawWebRequest.ContentType = 'application/json') then + if (Req.MethodType in [mtPost, mtPut, mtPatch]) and (Req.RawWebRequest.ContentType.Contains('application/json')) then begin try LJSON := {$IF DEFINED(FPC)} GetJSON(Req.Body) {$ELSE}TJSONObject.ParseJSONValue(Req.Body){$ENDIF};