Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing Middleware import on BaseHTTPMiddleware section #1844

Merged
merged 2 commits into from Sep 5, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/middleware.md
Expand Up @@ -190,8 +190,10 @@ To implement a middleware class using `BaseHTTPMiddleware`, you must override th
`async def dispatch(request, call_next)` method.

```python
from starlette.middleware import Middleware
Kludex marked this conversation as resolved.
Show resolved Hide resolved
from starlette.middleware.base import BaseHTTPMiddleware


class CustomHeaderMiddleware(BaseHTTPMiddleware):
async def dispatch(self, request, call_next):
response = await call_next(request)
Expand Down