[fpc-pascal] fpweb and reading the contents of a request
Felipe Monteiro de Carvalho
felipemonteiro.carvalho at gmail.com
Mon Oct 17 15:47:51 CEST 2011
Hello,
I am trying to send data from javascript and read data back from my
cgi module with this:
SendSyncRequest = function(RequestURL, RequestContent)
{
var request = new XMLHttpRequest();
request.open('GET', RequestURL, false);
request.setRequestHeader('Content-Type', 'text/html');
request.send(RequestContent);
//debugDiv.innerHTML = debugDiv.innerHTML + "after send<br>";
return request.responseText;
}
var tableInnerHTML =
SendSyncRequest("mywebapp.cgi?module=LobbyServer", "$200");
Which works, except for 1 thing. I wanted to read this "$200" in my
web module, but:
procedure TwebLobbyServer.DataModuleRequest(Sender: TObject;
ARequest: TRequest; AResponse: TResponse; var Handled: Boolean);
var
LobbyComm: TLobbyComm;
OPResponse: TGameResponse = nil;
Msg: TMarshallable;
begin
WebDebugOut('[TwebLobbyServer.DataModuleRequest] ARequest.Content='
+ ARequest.Content);
With this code I receive an empty ARequest.Content
Any ideas?
thanks,
--
Felipe Monteiro de Carvalho
More information about the fpc-pascal
mailing list