Description
By using MVCRestClient to connect to a DMVC server, the client hangs indefinitely in certain situations. The same project running in Windows or Android Environment works perfectly.
To exemplify this, I have prepared a simple project that connects to our client's server: a form containing a memo to enter the access token (which I provide separately), an edit to enter the endpoint of the call, a button and another memo for the result.
The code to make the call is as follows:
procedure TForm1.ButtonTestClick(Sender: TObject);
var
MVCRestClient: IMVCRestClient;
lRestResponse: IMVCRestResponse;
begin
MemoResponse.Lines.Clear;
MVCRestClient:=TMVCRestClient.New;
MVCRestClient.BaseURL('https://areapersonale.mutuabcc.it:8091/rest/api');
MVCRestClient.SetBearerAuthorization(MemoToken.Text);
try
MemoResponse.Lines.Add('Before');
lRestResponse:=MVCRestClient.GET('/'+EditEndPoint.Text);
MemoResponse.Lines.Add('After');
except
on E:Exception do begin
MemoResponse.Lines.Add('Exception on Get: '+E.Message);
Exit;
end;
end;
MemoResponse.Lines.Add(lRestResponse.Content);
end;
If the endpoint entered is "GetSezioni," the component crashes, but only on iOS; on Windows it works. An endpoint that works in all environments, however, is "GetNews." The server response is similar in the two cases; we do not understand why the first one in iOS crashes
Test.zip