mirror of
https://github.com/danieleteti/delphimvcframework.git
synced 2024-11-15 15:55:54 +01:00
30 lines
474 B
ObjectPascal
30 lines
474 B
ObjectPascal
unit Controller2U;
|
|
|
|
interface
|
|
|
|
uses
|
|
MVCFramework, MVCFramework.Commons;
|
|
|
|
type
|
|
|
|
[MVCPath('/controller2')]
|
|
TMyController2 = class(TMVCController)
|
|
public
|
|
[MVCPath]
|
|
[MVCHTTPMethod([httpGET])]
|
|
procedure Index;
|
|
end;
|
|
|
|
implementation
|
|
|
|
uses
|
|
System.SysUtils, MVCFramework.Logger, System.StrUtils;
|
|
|
|
procedure TMyController2.Index;
|
|
begin
|
|
// use Context property to access to the HTTP request and response
|
|
Render('Hello DelphiMVCFramework World');
|
|
end;
|
|
|
|
end.
|