procedure TWebModuleRequest.waiRequestAction(Sender: TObject;
Request: TWebRequest; Response: TWebResponse;
var Handled: Boolean);
var
sl : TStringList;
slResponse : TStringList;
begin
sl := TStringList.Create;
slResponse := TStringList.Create;
try
slResponse.Add('
<html><head><title>Request-Inhalt</title></head><body>');
slResponse.Add('
<h1>Request-Inhalt</h1><hr />');
slResponse.Add('
<table border="1" cellspacing="3">');
Request.ExtractContentFields(sl);
slResponse.Add('
<tr><td>ContentFields</td><td>');
slResponse.AddStrings(sl);
slResponse.Add('
</td></tr>');
Request.ExtractCookieFields(sl);
slResponse.Add('
<tr><td>CookieFields</td><td>');
slResponse.AddStrings(sl);
slResponse.Add('
</td></tr>');
Request.ExtractQueryFields(sl);
slResponse.Add('
<tr><td>QueryFields</td><td>');
slResponse.AddStrings(sl);
slResponse.Add('
</td></tr>');
slResponse.Add('
<tr><td>Accept</td><td>' + Request.Accept + '
</td></tr>');
slResponse.Add('
<tr><td>CacheControl</td><td>' + Request.CacheControl + '
</td></tr>');
slResponse.Add('
<tr><td>Connection</td><td>' + Request.Connection + '
</td></tr>');
slResponse.Add('
<tr><td>Content</td><td>' + Request.Content + '
</td></tr>');
slResponse.Add('
<tr><td>ContentEncoding</td><td>' + Request.ContentEncoding + '
</td></tr>');
slResponse.Add('
<tr><td>ContentType</td><td>' + Request.ContentType + '
</td></tr>');
slResponse.Add('
<tr><td>ContentVersion</td><td>' + Request.ContentVersion + '
</td></tr>');
slResponse.Add('
<tr><td>Cookie</td><td>' + Request.Cookie + '
</td></tr>');
slResponse.Add('
<tr><td>DerivedFrom</td><td>' + Request.DerivedFrom + '
</td></tr>');
slResponse.Add('
<tr><td>From</td><td>' + Request.From + '
</td></tr>');
slResponse.Add('
<tr><td>Host</td><td>' + Request.Host + '
</td></tr>');
slResponse.Add('
<tr><td>InternalPathInfo</td><td>' + Request.InternalPathInfo + '
</td></tr>');
slResponse.Add('
<tr><td>InternalScriptName</td><td>' + Request.InternalScriptName + '
</td></tr>');
slResponse.Add('
<tr><td>Method</td><td>' + Request.Method + '
</td></tr>');
slResponse.Add('
<tr><td>PathInfo</td><td>' + Request.PathInfo + '
</td></tr>');
slResponse.Add('
<tr><td>PathTranslated</td><td>' + Request.PathTranslated + '
</td></tr>');
slResponse.Add('
<tr><td>ProtocolVersion</td><td>' + Request.ProtocolVersion + '
</td></tr>');
slResponse.Add('
<tr><td>Query</td><td>' + Request.Query + '
</td></tr>');
slResponse.Add('
<tr><td>Referer</td><td>' + Request.Referer + '
</td></tr>');
slResponse.Add('
<tr><td>RemoteAddr</td><td>' + Request.RemoteAddr + '
</td></tr>');
slResponse.Add('
<tr><td>RemoteHost</td><td>' + Request.RemoteHost + '
</td></tr>');
slResponse.Add('
<tr><td>ScriptName</td><td>' + Request.ScriptName + '
</td></tr>');
slResponse.Add('
<tr><td>Title</td><td>' + Request.Title + '
</td></tr>');
slResponse.Add('
<tr><td>URL</td><td>' + Request.URL + '
</td></tr>');
slResponse.Add('
<tr><td>UserAgent</td><td>' + Request.UserAgent + '
</td></tr>');
slResponse.Add('
</table></body></html>');
Response.Content := slResponse.Text;
except
on e :
Exception do begin
Response.Content := e.
Message;
end;
end;
slResponse.Free;
sl.Free;
Handled := true;
end;