docs(examples): add a stateful server example with a request counter

This commit is contained in:
Sean McArthur
2018-07-06 15:24:01 -07:00
parent 8991707a6a
commit ae34a86cc3
3 changed files with 62 additions and 0 deletions

View File

@@ -19,6 +19,8 @@ parses it with serde and outputs the result.
* [`send_file`](send_file.rs) - A server that sends back content of files using tokio_fs to read the files asynchronously.
* [`state`](state.rs) - A webserver showing basic state sharing among requests. A counter is shared, incremented for every request, and every response is sent the last count.
* [`upgrades`](upgrades.rs) - A server and client demonstrating how to do HTTP upgrades (such as WebSockets or `CONNECT` tunneling).
* [`web_api`](web_api.rs) - A server consisting in a service that returns incoming POST request's content in the response in uppercase and a service that call that call the first service and includes the first service response in its own response.