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
Updating the FastAPI dependency to v0.54.1 fixed this issue. (Relevant changes were included in v0.50.0)
With the latest version a POST or GET to api/v1/farms will return an HTTP 307 redirect to api/v1/farms/. Testing this in curl you must supply the -L flag to follow redirects. But requests in the browser should normally redirect fine.
What I did find troubling, however, is that requsts to api/v1/farms/logs without a trailing slash, such as api/v1/farms/logs?farm_id=1&id=1 are failing. The redirect works, but the FastAPI seems to then interpret the farm_id query param as a path param instead.
I'm unsure if it is a FastAPI issue or something wrong with how I configured the routes and query params. I created a FastAPI issue with more details: fastapi/fastapi#1314
This isn't critical right now, but does seem to be an issue nonetheless. I'll leave this open for now.
There has been some weird issues where requests without the trailing slash fail, or default to a different request method.
When sending a
POST
toapi/v1/farms
, we seemed to get the response of aGET
request. Sending the same request toapi/v1/farms/
would indeedPOST
.The text was updated successfully, but these errors were encountered: