response lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- michoux · 2023-01-18 09:28 Hello, I have following html code, which posts some JSON data to my local service written in Lazarus. Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i                  

Localhost printing test

               

      Call        

    I am using fphttpapp as a server. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i  fphttpapp.Application.Port := 8000;  HTTPRouter.RegisterRoute('/test', @test, true);  fphttpapp.Application.Threaded := true;  fphttpapp.Application.Initialize;  TWebServerThread.Create(false);               I need to provide some response back to html $("#odgovor").html("Odgovor:
Success:
" + JSON.stringify(r, null, 2)); Any Idea how to send back the response? ---------------------------------------------------------------------- theo · 2023-01-18 09:51 Quote from: michoux on January 18, 2023, 10:28:07 amAny Idea how to send back the response? See the example here: https://wiki.freepascal.org/fphttpserver#Usage_2 Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i aResp.Content:=...