mirror of
https://github.com/actix/examples
synced 2025-06-28 09:50:36 +02:00
fix broken links (#441)
Co-authored-by: Igor Aleksanov <popzxc@yandex.ru> Co-authored-by: Altug Sahin <altugsahin@gmail.com> Co-authored-by: Rob Ede <robjtede@icloud.com>
This commit is contained in:
@ -1,12 +1,12 @@
|
||||
This is a contrived example intended to illustrate a few important actix-web features.
|
||||
|
||||
*Imagine* that you have a process that involves 3 steps. The steps here
|
||||
are dumb in that they do nothing other than call an
|
||||
httpbin endpoint that returns the json that was posted to it. The intent here
|
||||
is to illustrate how to chain these steps together as futures and return
|
||||
a final result in a response.
|
||||
*Imagine* that you have a process that involves 3 steps. The steps here
|
||||
are dumb in that they do nothing other than call an HTTP endpoint that
|
||||
returns the json that was posted to it. The intent here is to illustrate
|
||||
how to chain these steps together as futures and return a final result
|
||||
in a response.
|
||||
|
||||
Actix-web features illustrated here include:
|
||||
Actix Web features illustrated here include:
|
||||
|
||||
1. handling json input param
|
||||
2. validating user-submitted parameters using the 'validator' crate
|
||||
@ -15,5 +15,13 @@ Actix-web features illustrated here include:
|
||||
3. chaining futures into a single response used by an asynch endpoint
|
||||
|
||||
|
||||
### server
|
||||
|
||||
```bash
|
||||
cd basics/json-validation
|
||||
cargo run
|
||||
# Started http server: 127.0.0.1:8080
|
||||
```
|
||||
|
||||
Example query from the command line using httpie:
|
||||
```echo '{"id":"1", "name": "JohnDoe"}' | http 127.0.0.1:8080/something```
|
||||
|
Reference in New Issue
Block a user