Skip to content

Commit

Permalink
handle async generator in starlette
Browse files Browse the repository at this point in the history
  • Loading branch information
sidux committed Dec 28, 2023
1 parent bc04aa5 commit 85ee147
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion connexion/frameworks/starlette.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def build_response(
):
if isinstance(data, dict) or isinstance(data, list):
response_cls = StarletteJSONResponse
elif isinstance(data, t.Generator):
elif isinstance(data, t.Generator) or isinstance(data, t.AsyncGenerator):
response_cls = StarletteStreamingResponse
else:
response_cls = StarletteResponse
Expand Down

0 comments on commit 85ee147

Please sign in to comment.