delphi-rest-client-api
delphi-rest-client-api copied to clipboard
XE4 compiling problem
A fresh checkout from today gives on compiling DelphiXE4_RestApi.bpl:
[dcc32 Fehler] RestClient.pas(1001): E2250 Es gibt keine überladene Version von 'Post', die man mit diesen Argumenten aufrufen kann => function TResource.Post(Entity: TObject): TObject; begin Result := Post(Entity, Entity.ClassType); end;
[dcc32 Fehler] RestClient.pas(1028): E2250 Es gibt keine überladene Version von 'Put', die man mit diesen Argumenten aufrufen kann => function TResource.Put(Entity: TObject): TObject; begin Result := Put(Entity, Entity.ClassType); end;
[dcc32 Fehler] RestClient.pas(1065): E2250 Es gibt keine überladene Version von 'Patch', die man mit diesen Argumenten aufrufen kann => function TResource.Patch(Entity: TObject): TObject; begin Result := Patch(Entity, Entity.ClassType); end;
How to fix it? Regards, Bernd
Getting same error with XE5
Use instead of the faulty method calls:
function TResource.Post(Entity: TObject): TObject; begin Result := EntityRequest(Entity, Entity.ClassType, METHOD_POST); // Result := Post(Entity, Entity.ClassType); end;
function TResource.Put(Entity: TObject): TObject; begin Result := EntityRequest(Entity, Entity.ClassType, METHOD_PUT); // Result := Put(Entity, Entity.ClassType); end;
function TResource.Patch(Entity: TObject): TObject; begin Result := EntityRequest(Entity, Entity.ClassType, METHOD_PATCH); // Result := Patch(Entity, Entity.ClassType); end;
That worked man!! Just search the commented lines and go ahead with the full replacements of the associated functions/procedures as suggested above. It will compile!