procedure TForm1.LoadClients(AFirstName, ALastName: String);
var
Client: TXDataWebClient;
Response: TXDataClientResponse;
begin
try
Client:= TXDataWebClient.Create(nil);
Client.Connection:=Connection;
Response:= TAwait.Exec(XDataWebClient.RawInvokeAsync('IMyService.GetClientsLike',['M', 'T']));
XDataWebDataSet.SetJsonData(Response.Result);
XDataWebDataSet.Open;
finally
FreeAndNil(Client);
end;
end;
//Response:= TAwait.Exec(XDataWebClient.RawInvokeAsync('IMyService.GetClientsLike',['M', 'T']));
//Error: await only available in async procedure
What is the problem?