From 885d902b7d609d00c7f0c0b341c28eea455d0dca Mon Sep 17 00:00:00 2001 From: taoufik07 Date: Tue, 26 Feb 2019 23:46:07 +0100 Subject: [PATCH] Revert --- docs/source/tour.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/source/tour.rst b/docs/source/tour.rst index 11dd558..5e28443 100644 --- a/docs/source/tour.rst +++ b/docs/source/tour.rst @@ -235,7 +235,7 @@ Using ``before_request`` If you'd like a view to be executed before every request, simply do the following:: - @api.before_request() + @api.route(before_request=True) def prepare_response(req, resp): resp.headers["X-Pizza"] = "42" @@ -243,7 +243,7 @@ Now all requests to your HTTP Service will include an ``X-Pizza`` header. For ``websockets``:: - @api.before_request(websocket=True) + @api.route(before_request=True, websocket=True) def prepare_response(ws): await ws.accept()