-
Notifications
You must be signed in to change notification settings - Fork 1.1k
chore: use starlette built-in Route class #2267
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
4b994e5
to
5a6cb56
Compare
route=e.route, | ||
method=e.method, | ||
route=e.path, | ||
method=next(iter([m for m in e.methods if m != "HEAD"])), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is confusing, why is this needeed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because fastapi adds "HEAD" in methods if the method is GET :/
5a6cb56
to
78ea523
Compare
|
||
from pydantic import BaseModel | ||
from aiohttp import hdrs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know what this gets us. GET / POST / DELETE is straightforward enough
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, most constants are straightforward 😅
78ea523
to
d584007
Compare
arrrrghh this |
yess, I hate it. I am pretty sure I am doing something wrong here. Do you have the full stack trace? Let's fix this goddammit. |
Opened this earlier #2278 |
393348d
to
fddd58e
Compare
Use a more common pattern and known terminology from the ecosystem, where Route is more approved than Endpoint. Signed-off-by: Sébastien Han <[email protected]>
fddd58e
to
9472c10
Compare
What does this PR do?
Use a more common pattern and known terminology from the ecosystem, where Route is more approved than Endpoint.