How can I create an api rest (GET POST and authentication) service in an unigui project?
thank you
As delphidude suggested.
But you can also use the OnHTTPCommand event on the ServerModule. Just be aware that this is not associated with a session. Just do a search in the forum for "OnHTTPCommand". Below is an example.
procedure TUniServerModule.UniGUIServerModuleHTTPCommand(ARequestInfo: TIdHTTPRequestInfo;
AResponseInfo: TIdHTTPResponseInfo; var Handled: Boolean);
var
dm : TdmReportData;
begin
if ARequestInfo.URI='/report/finsummary' then
begin
dm := TdmReportData.Create(n