mirror of
https://github.com/fafhrd91/actix-web
synced 2025-07-17 15:06:51 +02:00
added clarification to docs regarding middleware processing sequence, added delete method to TestRequest (#799)
* added clarification to docs regarding middleware processing sequnce * added delete method to TestRequest, doc, and test
This commit is contained in:
10
src/app.rs
10
src/app.rs
@@ -301,7 +301,15 @@ where
|
||||
/// lifecycle (request -> response), modifying request/response as
|
||||
/// necessary, across all requests managed by the *Application*.
|
||||
///
|
||||
/// Use middleware when you need to read or modify *every* request or response in some way.
|
||||
/// Use middleware when you need to read or modify *every* request or
|
||||
/// response in some way.
|
||||
///
|
||||
/// Notice that the keyword for registering middleware is `wrap`. As you
|
||||
/// register middleware using `wrap` in the App builder, imagine wrapping
|
||||
/// layers around an inner App. The first middleware layer exposed to a
|
||||
/// Request is the outermost layer-- the *last* registered in
|
||||
/// the builder chain. Consequently, the *first* middleware registered
|
||||
/// in the builder chain is the *last* to execute during request processing.
|
||||
///
|
||||
/// ```rust
|
||||
/// use actix_service::Service;
|
||||
|
Reference in New Issue
Block a user