Skip to content
Discussion options

You must be logged in to vote

I believe the more correct way to express this would be

if connection.scope["type"] == ScopeType.HTTP:
 request = Request[Any, Any, Any](scope)
 method = request.method
else:
 method = scope["type"]

since it doesn't make sense to create a request for a non-http connection.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@bunny-therapist
Comment options

@provinzkraut
Comment options

Answer selected by bunny-therapist
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants