it would be easier for me and above all clearer if the "RawInvoke" method from the TXDataClient could ALWAYS get the "RequestId" parameter.
Reason:
I have many different functions and therefore do NOT use the OnLoadEvent, but use my own SuccessProcs.
But some of these SuccessProcs handle different calls. So that I can distinguish these calls, that would be great.
The RequestId parameter is only included when it's needed. There is no need for the RequestId if you use SuccessProc, because you can use an anonymous method and then capture the current RequestId.
The problem is that the parameter will be redundant for such methods. What is more work, exactly? Can you share your code so maybe I can understand better what you are struggling with?
I made it too complicated at first.
Now I've found another way to do it.
Here's the code. But I haven't been able to test it yet because I'm still having some issues with Web Core.
But I think it should work. And then it's really not that much effort.
(The "AJobNum" is passed on. Hopefully right.)
procedure TdmDok.GetDokumentlist( AOrdnerID: String; AJobNum: Integer; ACallback: TWebModelCallbackEvent);
begin
XClient.List( 'Ordnerinhalt',
'$expand=Dokument/DokTyp&$filter=OrdnerId '+AOrdnerID + '&$orderby=Position asc',
procedure( Response: TXDataClientResponse)
begin
if Response.StatusCode = _http_200_Ok then
ACallback( Self, AJobNum, Response);
end,
TXDataClientErrorProc( @XClientError));
end;