2018-04-13 03:18:42 +02:00
|
|
|
# basics
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
|
|
|
### server
|
|
|
|
|
|
|
|
```bash
|
2018-05-21 03:22:37 +02:00
|
|
|
cd examples/basics
|
2018-04-13 03:18:42 +02:00
|
|
|
cargo run
|
|
|
|
# Started http server: 127.0.0.1:8080
|
|
|
|
```
|
|
|
|
|
|
|
|
### web client
|
|
|
|
|
2018-04-15 04:37:52 +02:00
|
|
|
- [http://localhost:8080/](http://localhost:8080/static/index.html)
|
2018-04-13 03:18:42 +02:00
|
|
|
- [http://localhost:8080/async/bob](http://localhost:8080/async/bob)
|
2018-07-04 09:43:54 +02:00
|
|
|
- [http://localhost:8080/user/bob/](http://localhost:8080/user/bob/) text/plain download
|
2018-04-13 03:18:42 +02:00
|
|
|
- [http://localhost:8080/test](http://localhost:8080/test) (return status switch GET or POST or other)
|
2018-04-15 04:45:30 +02:00
|
|
|
- [http://localhost:8080/favicon](http://localhost:8080/static/favicon.htmicol)
|
2018-04-15 04:37:52 +02:00
|
|
|
- [http://localhost:8080/welcome](http://localhost:8080/static/welcome.html)
|
|
|
|
- [http://localhost:8080/notexit](http://localhost:8080/static/404.html) display 404 page
|
|
|
|
- [http://localhost:8080/error](http://localhost:8080/error) Panic after request
|