forked from pedrolopix/DelphiSimpleRestServer
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCommands.pas
More file actions
63 lines (47 loc) · 903 Bytes
/
Commands.pas
File metadata and controls
63 lines (47 loc) · 903 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
unit Commands;
interface
uses
HttpServerCommand;
type
TRestTestUnimplemented = class(TRestCommand)
protected
procedure execute; override;
end;
TRestTeste=class(TRESTCommand)
protected
procedure execute; override;
end;
TRestTeste2=class(TRESTCommand)
protected
procedure execute; override;
end;
TRestTesteParam=class(TRESTCommand)
protected
procedure execute; override;
end;
implementation
uses
System.SysUtils;
{ TRestTeste }
procedure TRestTeste.execute;
begin
inherited;
ResponseJSON('{''teste'':''ok''}');
end;
{ TRestTeste2 }
procedure TRestTeste2.execute;
begin
inherited;
ResponseJSON('{''teste2'':''ok''}');
end;
{ TRestTesteParam }
procedure TRestTesteParam.execute;
begin
inherited;
ResponseJSON('{''params'':'+QuotedStr(params.commatext)+'}');
end;
procedure TRestTestUnimplemented.execute;
begin
Error(501);
end;
end.