Foreshadow routing and catcher options in overview.

Resolves #1206.

Co-authored-by: Jeb Rosen <jeb@jebrosen.com>
This commit is contained in:
Sergio Benitez 2020-06-11 20:41:10 -07:00
parent 74f15a7ab5
commit 336353ced6
1 changed files with 6 additions and 4 deletions

View File

@ -72,10 +72,12 @@ fn world() -> &'static str { // <- request handler
```
This declares the `world` route to match against the static path `"/world"` on
incoming `GET` requests. The `world` route is simple, but additional route
parameters are necessary when building more interesting applications. The
[Requests](../requests) section describes the available options for
constructing routes.
incoming `GET` requests. Instead of `#[get]`, we could have used `#[post]` or
`#[put]` for other HTTP methods, or `#[catch]` for serving [custom error
pages](../requests/#error-catchers). Additionally, other route parameters may be
necessary when building more interesting applications. The
[Requests](../requests) chapter, which follows this one, has further details on
routing and error handling.
## Mounting