TestDm.pas
资源名称:delphi.rar [点击查看]
上传用户:fh681027
上传日期:2022-07-23
资源大小:1959k
文件大小:1k
源码类别:
Delphi控件源码
开发平台:
Delphi
- unit TestDm;
- interface
- uses
- SysUtils, Classes, HTTPApp;
- type
- TWebModule2 = class(TWebModule)
- procedure WebModule2WebActionItem1Action(Sender: TObject;
- Request: TWebRequest; Response: TWebResponse; var Handled: Boolean);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
- var
- WebModule2: TWebModule2;
- implementation
- uses WebReq;
- {$R *.DFM}
- procedure TWebModule2.WebModule2WebActionItem1Action(Sender: TObject;
- Request: TWebRequest; Response: TWebResponse; var Handled: Boolean);
- begin
- Response.Content := '<h1>Hello</h1>';
- end;
- initialization
- WebRequestHandler.WebModuleClass := TWebModule2;
- end.