You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by dwinston June 3, 2022
I find that I can't GET or POST to a path containing a colon (":"). An example in FastAPI (which uses Starlette):
fromfastapiimportFastAPIapp=FastAPI()
@app.get("/items:queue")defqueue_new_item():
return"An item has been queued for later inclusion."
On uvicorn main:app --reload (FYI Python 3.9.12 and FastAPI 0.78.0 on MacOS), I get a 404 response from GET http://127.0.0.1:8000/items:queue.
I suspect 7c7ec5a broke this. It works in starlette 0.17.1 (I have a deployment using this version; I was wondering why colon-including routes are not working for me locally, where I am using 0.19.1 -- via latest FastAPI: https://fastapi.tiangolo.com/release-notes/), and I see that this commit was included since 0.18.0.
Discussed in #1673
Originally posted by dwinston June 3, 2022
I find that I can't GET or POST to a path containing a colon (":"). An example in FastAPI (which uses Starlette):
On
uvicorn main:app --reload
(FYI Python 3.9.12 and FastAPI 0.78.0 on MacOS), I get a 404 response fromGET http://127.0.0.1:8000/items:queue
.I also filed this issue in the fastapi repo (fastapi/fastapi#4984), but I suspect that Starlette's use of colons for path parameter converters (https://www.starlette.io/routing/) may be playing a role here.
Is this a bug? I am trying to follow the official google cloud APIs "custom methods" pattern https://cloud.google.com/apis/design/custom_methods:
The text was updated successfully, but these errors were encountered: