We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9a6e457 commit 5755a3bCopy full SHA for 5755a3b
1 file changed
README.md
@@ -5,27 +5,21 @@ Middleware for Basic Authentication in HORSE
5
Sample Horse server validate basic authentication:
6
7
```delphi
8
-uses
9
- Horse, Horse.BasicAuthentication, System.SysUtils;
10
-
11
-var
12
- App: THorse;
+uses Horse, Horse.BasicAuthentication, System.SysUtils;
13
14
begin
15
- App := THorse.Create(9000);
16
17
- App.Use(HorseBasicAuthentication(
+ THorse.Use(HorseBasicAuthentication(
18
function(const AUsername, APassword: string): Boolean
19
20
Result := AUsername.Equals('user') and APassword.Equals('password');
21
end));
22
23
- App.Get('ping',
+ THorse.Get('/ping',
24
procedure(Req: THorseRequest; Res: THorseResponse; Next: TProc)
25
26
Res.Send('pong');
27
end);
28
29
- App.Start;
+ THorse.Listen(9000);
30
end.
31
```
0 commit comments