I am studyng these pages.
I'd like to notify the maintainer that the 1st example Hello, World!
Let's create a simple Web Application.
is buggy.
There is no way (or I could find no way) to set the module reesponse.
According to the notes, I should be able to write this code from the object inspector, but could find no way to do it
procedure TFPWebModule1.DataModuleRequest(Sender: TObject; ARequest:
TRequest;AResponse: TResponse; var Handled: Boolean);begin
AResponse.Content := 'Hello, World!';
Handled := true;
end;I am working in windows 10 with Lazarus 3.4.
With the help of DeepSeek, I was able to create a response by adding
HTTPRouter.RegisterRoute('/', @HandleHello);to the main body of the code and - of course -
procedure HandleHello(ARequest: TRequest; AResponse: TResponse);
begin
AResponse.Content := 'Hello World!';
AResponse.ContentType := 'text/plain';
AResponse.SendResponse;
end;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20250807/47429a9c/attachment.htm>