diff --git a/sources/MVCFramework.RESTClient.pas b/sources/MVCFramework.RESTClient.pas index 9da756e1..56dd2dcf 100644 --- a/sources/MVCFramework.RESTClient.pas +++ b/sources/MVCFramework.RESTClient.pas @@ -725,7 +725,9 @@ end; function TMVCRESTClient.AddFile(const aName: string; aFileStreamValue: TStream; const aFileName, aContentType: string): IMVCRESTClient; begin Result := Self; +{$WARNINGS OFF} GetBodyFormData.AddStream(aName, aFileStreamValue, aFileName, aContentType); +{$WARNINGS ON} SetContentType(TMVCMediaType.MULTIPART_FORM_DATA); end; {$ENDIF} diff --git a/sources/MVCFramework.Serializer.JsonDataObjects.pas b/sources/MVCFramework.Serializer.JsonDataObjects.pas index a5078f00..acac02de 100644 --- a/sources/MVCFramework.Serializer.JsonDataObjects.pas +++ b/sources/MVCFramework.Serializer.JsonDataObjects.pas @@ -292,20 +292,20 @@ end; procedure TMVCJsonDataObjectsSerializer.AfterConstruction; var lStreamSerializer: IMVCTypeSerializer; - lDataSetHolderSerializer: TMVCDataSetHolderSerializer; fObjectDictionarySerializer: TMVCObjectDictionarySerializer; begin inherited AfterConstruction; - lDataSetHolderSerializer := TMVCDataSetHolderSerializer.Create; - GetTypeSerializers.Add(TypeInfo(TDataSetHolder), lDataSetHolderSerializer); lStreamSerializer := TMVCStreamSerializerJsonDataObject.Create; GetTypeSerializers.Add(TypeInfo(TStream), lStreamSerializer); GetTypeSerializers.Add(TypeInfo(TStringStream), lStreamSerializer); GetTypeSerializers.Add(TypeInfo(TFileStream), lStreamSerializer); GetTypeSerializers.Add(TypeInfo(TMemoryStream), lStreamSerializer); + GetTypeSerializers.Add(TypeInfo(TBytesStream), lStreamSerializer); + fStringDictionarySerializer := TMVCStringDictionarySerializer.Create; GetTypeSerializers.Add(TypeInfo(TMVCStringDictionary), fStringDictionarySerializer); GetTypeSerializers.Add(TypeInfo(TGUID), TMVCGUIDSerializer.Create); + fObjectDictionarySerializer := TMVCObjectDictionarySerializer.Create(self); GetTypeSerializers.Add(TypeInfo(TMVCObjectDictionary), fObjectDictionarySerializer); GetTypeSerializers.Add(TypeInfo(TMVCListOfString { TList } ), TMVCListOfStringSerializer.Create);