You are not logged in.
Pages: 1
Hi,
I have a server function which returns a RawJSON string:
function Connect(const aUrl: RawUTF8): RawJSON;
Function result from server:
20170614 06363933 ret uHTTPServer.TOdbcRestServer(7EF49BE0) {Result:{"SessionId":2,"ProductName":"","ProductVer":"","MajorVer":0,"MinorVer":0}}
On client side, when I call Connect I expect to receive as result value: {"SessionId":2,"ProductName":"","ProductVer":"","MajorVer":0,"MinorVer":0}
But it raises error in FakeCall: Unexpected parameter "SessionId".
Looks like it searches for a var/out parameter SessionId, which is obviously missing.
How can I return back a JSON string from a server function?
Offline
Please ensure you read the doc about response format.
https://synopse.info/files/html/Synopse … #TITLE_458
(and previous paragraphs)
As documented, SessionId is a hidden parameter, used for sicClientDriven mode.
In the server logs, you don't see it, but it is transmitted to the client side, to identify the session expected.
Both client and server side should use the very same routing settings.
Offline
I got it, thanks!
Offline
Pages: 1