Skip to content

docs: show correct add_url_rule example for AsyncApp - #2131

Open
ChrisJr404 wants to merge 1 commit into
spec-first:mainfrom
ChrisJr404:docs-async-add-url-rule
Open

docs: show correct add_url_rule example for AsyncApp#2131
ChrisJr404 wants to merge 1 commit into
spec-first:mainfrom
ChrisJr404:docs-async-add-url-rule

Conversation

@ChrisJr404

Copy link
Copy Markdown

The individual-paths example in the routing docs returned a bare status code and took no request argument, which only works for FlaskApp. AsyncApp routes through Starlette, so its view function receives a Request and returns a Response. This splits the example per framework so both are correct.

Closes #1946

The individual-paths example returned a bare status code and took no
request argument, which only works for FlaskApp. AsyncApp routes through
Starlette, so its view function receives a Request and returns a
Response. Split the example per framework so both are correct.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Documentation is misleading for add_url_rule when using AsyncApp

1 participant