POST/GET Problem lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- ahiggins · 2018-03-06 17:09 Hi, I'm having issues using POST to send data from a HTML form to my Apache Module 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 procedure TFPWebModule1.DataModuleRequest(Sender: TObject; ARequest: TRequest; AResponse: TResponse; Var Handled: Boolean);var Str : String; begin ARequest.ContentType:='APPLICATION/X-WWW-FORM- URLENCODED'; Str:='[returned data] - '+ARequest.QueryFields.Values['pname']; AResponse.Content:=Str; Handled:=True;end; the above works fine if i sent the the data via a simple form using GET 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
the Apache module returns the below correctly. [returned data] - Jon Doe but if i change the code to handle POST 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 procedure TFPWebModule1.DataModuleRequest(Sender: TObject; ARequest: TRequest; AResponse: TResponse; Var Handled: Boolean);var Str : String; begin ARequest.ContentType:='APPLICATION/X-WWW-FORM- URLENCODED'; Str:='[returned data] - '+ARequest.Content; AResponse.Content:=Str; Handled:=True;end; and send the data with a simple html form using POST 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 the Apache module fails to return any data. [returned data] - any help would be great. Tony ---------------------------------------------------------------------- heejit · 2018-03-06 20:50 Try 1. ARequest.ContentFields.Values['