Skip to content

Commit

Permalink
Update explanations of response middlewares
Browse files Browse the repository at this point in the history
  • Loading branch information
Bluenix2 authored Feb 13, 2022
1 parent bbc761d commit 240ae58
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sanic/mixins/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def middleware(
):
"""
Decorate and register middleware to be called before a request
is handled or a response sent. Can either be called as
is handled or after a response is created. Can either be called as
*@app.middleware* or *@app.middleware('request')*.
`See user guide re: middleware
Expand Down Expand Up @@ -59,7 +59,7 @@ def on_request(self, middleware=None):
return partial(self.middleware, attach_to="request")

def on_response(self, middleware=None):
"""Register a middleware to be called before a response is sent.
"""Register a middleware to be called after a response is created.
This is the same as *@app.middleware('response')*.
Expand Down

0 comments on commit 240ae58

Please sign in to comment.