Skip to content

Commit 8b93af3

Browse files
author
bChiquet
committed
factor in @alp's feedbacks on PR #1455
1 parent 29aa101 commit 8b93af3

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

doc/tutorial/ApiType.lhs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -390,10 +390,10 @@ with the rest of your API. But you can plug in everything that is an
390390
`Application`, e.g. a whole web application written in any of the web
391391
frameworks that support `wai`.
392392
393-
Be mindful! This library works by pattern-matching the different routes that are
394-
composed using `:<|>`. `Raw`, as an escape hatch, matches any route that hasn't
395-
been matched by previous patterns. Therefore, any subsequent route will be silently
396-
ignored.
393+
Be mindful! The `servant-server`'s router works by pattern-matching the
394+
different routes that are composed using `:<|>`. `Raw`, as an escape hatch,
395+
matches any route that hasn't been matched by previous patterns. Therefore,
396+
any subsequent route will be silently ignored.
397397
398398
``` haskell
399399
type UserAPI14 = Raw
@@ -403,12 +403,12 @@ type UserAPI14 = Raw
403403
-- endpoint matches requests before
404404
```
405405
A simple way to avoid this pitfall is to either use `Raw` as the last
406-
definition, or to always have it under a directory.
406+
definition, or to always have it under a static path.
407407
408408
``` haskell
409409
type UserAPI15 = "files" :> Raw
410-
-- The raw endpoint is under a directory,
411-
-- so it won't match /users.
410+
-- The raw endpoint is under the /files
411+
-- static path, so it won't match /users.
412412
:<|> "users" :> Get '[JSON] [User]
413413
414414
type UserAPI16 = "users" :> Get '[JSON] [User]

0 commit comments

Comments
 (0)