delphimvcframework/samples/middleware/AppControllerU.pas

34 lines
503 B
ObjectPascal

unit AppControllerU;
interface
uses MVCFramework,
MVCFramework.Commons,
MVCFramework.Logger,
Web.HTTPApp;
type
[MVCPath('/')]
TApp1MainController = class(TMVCController)
public
[MVCPath('/')]
[MVCHTTPMethod([httpGET])]
procedure Index;
end;
implementation
uses
System.SysUtils;
{ TApp1MainController }
procedure TApp1MainController.Index;
begin
ContentType := TMVCMediaType.TEXT_PLAIN;
Render(StringOfChar('*', 1024));
end;
end.