mirror of
https://github.com/actix/examples
synced 2024-11-23 22:41:07 +01:00
Fixes trivial typos.
This commit is contained in:
parent
aa5750cafc
commit
f7dd2e6236
@ -1,7 +1,7 @@
|
|||||||
## Middleware example
|
## Middleware example
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd form
|
cd middleware
|
||||||
cargo run
|
cargo run
|
||||||
# Started http server: 127.0.0.1:8080
|
# Started http server: 127.0.0.1:8080
|
||||||
```
|
```
|
||||||
|
@ -3,10 +3,10 @@ use actix_web::{dev::ServiceRequest, dev::ServiceResponse, Error};
|
|||||||
use futures::future::{ok, FutureResult};
|
use futures::future::{ok, FutureResult};
|
||||||
use futures::{Future, Poll};
|
use futures::{Future, Poll};
|
||||||
|
|
||||||
// There are two step in middleware processing.
|
// There are two steps in middleware processing.
|
||||||
// 1. Middleware initialization, middleware factory get called with
|
// 1. Middleware initialization, middleware factory gets called with
|
||||||
// next service in chain as parameter.
|
// next service in chain as parameter.
|
||||||
// 2. Middleware's call method get called with normal request.
|
// 2. Middleware's call method gets called with normal request.
|
||||||
pub struct SayHi;
|
pub struct SayHi;
|
||||||
|
|
||||||
// Middleware factory is `Transform` trait from actix-service crate
|
// Middleware factory is `Transform` trait from actix-service crate
|
||||||
|
Loading…
Reference in New Issue
Block a user