Skip to content

Commit 5755a3b

Browse files
Update README.md
1 parent 9a6e457 commit 5755a3b

1 file changed

Lines changed: 4 additions & 10 deletions

File tree

README.md

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,21 @@ Middleware for Basic Authentication in HORSE
55
Sample Horse server validate basic authentication:
66

77
```delphi
8-
uses
9-
Horse, Horse.BasicAuthentication, System.SysUtils;
10-
11-
var
12-
App: THorse;
8+
uses Horse, Horse.BasicAuthentication, System.SysUtils;
139
1410
begin
15-
App := THorse.Create(9000);
16-
17-
App.Use(HorseBasicAuthentication(
11+
THorse.Use(HorseBasicAuthentication(
1812
function(const AUsername, APassword: string): Boolean
1913
begin
2014
Result := AUsername.Equals('user') and APassword.Equals('password');
2115
end));
2216
23-
App.Get('ping',
17+
THorse.Get('/ping',
2418
procedure(Req: THorseRequest; Res: THorseResponse; Next: TProc)
2519
begin
2620
Res.Send('pong');
2721
end);
2822
29-
App.Start;
23+
THorse.Listen(9000);
3024
end.
3125
```

0 commit comments

Comments
 (0)