[Pas2js] rpcclient without parameters doesn't work

Luca Olivetti luca at ventoso.org
Tue Sep 13 14:57:32 CEST 2022


El 13/9/22 a les 14:38, Mattias Gaertner ha escrit:
> On Tue, 13 Sep 2022 09:22:33 +0000 (UTC)
> Luca Olivetti <luca at ventoso.org> wrote:
> 
>> [...]
>> if Assigned(aRequest.Params)
>>
>> evaluates to false, even if aRequest.Params is there (though it's an
>> empty array).
> 
> An empty Pascal array can be nil so Assigned(nil) can be false.

Then either the condition is wrong or there should be an "else" to 
assign aSerialized['params'] no matter what.
Or modify the server to accept a missing 'params' in the json instead of 
erroring out.

Bye
-- 
Luca



More information about the Pas2js mailing list