Misschien interressant voor anderen.
Het is gelukt ! Probeer de onderstaande code maar eens !
Code:
procedure TWebModule1.WebModule1WA_TestAction(Sender: TObject;
Request: TWebRequest; Response: TWebResponse; var Handled: Boolean);
var
I: Integer;
S: string;
begin
Response.SendResponse;
S := '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"><TITLE>Streaming null and date values</TITLE><META content="MSHTML 5.00.2919.6307" name=GENERATOR>';
Request.WriteString(S);
// Important that this is first!
S := 'About to send time stamps<br>';
// Send the content early by accessing the Request
// directly and writing to it.
Writeln(output,s);
Flush(Output);
// Handled := True;
// Send some Responses and pause to simulate lengthy operations
for I := 1 to 3 do
begin
// Pause for about 3 secs
Sleep(1000);
// Set another response
S := TimeToStr(Now) + '<br>';
// Request.WriteString(S);
Writeln(Output,S);
Flush(Output);
end;
end;
Bookmarks