@@ -390,10 +390,10 @@ with the rest of your API. But you can plug in everything that is an
390
390
`Application`, e.g. a whole web application written in any of the web
391
391
frameworks that support `wai`.
392
392
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.
397
397
398
398
`` ` haskell
399
399
type UserAPI14 = Raw
@@ -403,12 +403,12 @@ type UserAPI14 = Raw
403
403
-- endpoint matches requests before
404
404
`` `
405
405
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 .
407
407
408
408
`` ` haskell
409
409
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.
412
412
:<|> " users" :> Get '[JSON] [User]
413
413
414
414
type UserAPI16 = " users" :> Get '[JSON] [User]
0 commit comments