You are not logged in.
Hello,
I am using the TSQLRestServerFullMemory class to communicate with the client. I can resivce data from the server (GET), but don't know how I can access the input data (POST/PUT/DELETE), send by the client.
I have the following code:
TTableService = class(TSQLRestServerFullMemory)
published
procedure Article(Ctxt: TSQLRestServerURIContext);
end;
procedure TTableService.Article(Ctxt: TSQLRestServerURIContext);
begin
case Ctxt.Method of
mGET: Ctxt.Returns(TTblArticle.Read);
mPUT: ???;
mPOST: ???;
mDELETE: ???;
else
SetErrorMessage(Ctxt, Format(RS_ContextMethodNotSupported, [Ord(Ctxt.Method)]));
end;
end;
Offline
Oh ... I just saw it is Ctxt.Call^.InBody.
Since I am using Lazarus, I have to use the pointer operator ^ to access its memebers, where Delphi has some compiler magic.
Offline