From 64e84772367c3a46009dd5b66c910e2bdb99f3a7 Mon Sep 17 00:00:00 2001 From: Nikita Puzankov Date: Mon, 3 Feb 2020 23:31:18 +0400 Subject: [PATCH] Update handlers.md (#157) * Update handlers.md Links updated to 2.0, one duplicate was removed. --- content/docs/handlers.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/content/docs/handlers.md b/content/docs/handlers.md index bd0b79c..04839cd 100644 --- a/content/docs/handlers.md +++ b/content/docs/handlers.md @@ -8,7 +8,7 @@ weight: 160 A request handler is an async function that accepts zero or more parameters that can be extracted from a request (ie, [*impl FromRequest*][implfromrequest]) and returns a type that can -be converted into an HttpResponse (ie, [*impl Responder*][implresponder]). +be converted into an HttpResponse (ie, [*impl Responder*][respondertrait]). Request handling happens in two stages. First the handler object is called, returning any object that implements the [*Responder*][respondertrait] trait. Then, `respond_to()` is @@ -73,8 +73,7 @@ different responder types into a single type. {{< include-example example="either" file="main.rs" section="either" >}} -[implfromrequest]: https://docs.rs/actix-web/1.0.2/actix_web/trait.FromRequest.html -[implresponder]: https://docs.rs/actix-web/1.0.2/actix_web/trait.Responder.html -[respondertrait]: https://docs.rs/actix-web/1.0.2/actix_web/trait.Responder.html -[responderimpls]: https://docs.rs/actix-web/1.0.2/actix_web/trait.Responder.html#foreign-impls -[either]: https://docs.rs/actix-web/1.0.2/actix_web/enum.Either.html +[implfromrequest]: https://docs.rs/actix-web/2/actix_web/trait.FromRequest.html +[respondertrait]: https://docs.rs/actix-web/2/actix_web/trait.Responder.html +[responderimpls]: https://docs.rs/actix-web/2/actix_web/trait.Responder.html#foreign-impls +[either]: https://docs.rs/actix-web/2/actix_web/enum.Either.html