# Cannot POST /spaces/\[myusername\]/test/predict

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcannot-post-spaces-myusername-test-predict%2F107806%3E%5C
**Category:** Beginners\
**Created:** [September 22, 2024, 2:26pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcannot-post-spaces-myusername-test-predict%2F107806 "2024-09-22T14:26:45Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FJohn6666)%5C
**Post date:** [September 22, 2024, 8:39pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcannot-post-spaces-myusername-test-predict%2F107806%2F2 "2024-09-22T20:39:58Z")

</div>

Try this.

> [@FastAPI Routing Issue in Hugging Face Spaces](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ffastapi-routing-issue-in-hugging-face-spaces%2F54962)%3A
>
> Hello everyone, I’ve deployed a FastAPI application on Hugging Face Spaces. Everything seems to be running smoothly, and there are no errors in the logs. However, when I try to access my endpoints via a browser or tools like Postman, I’m getting a “404 error” or a “Cannot POST” error. Here’s a brief overview of my setup: I have a FastAPI route defined as @app.get("/check\_request") and another one as @app.post("/recommend"). My Dockerfile specifies the CMD as CMD ["uvicorn", "app:app", "--hos…

---

_[View the full topic](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcannot-post-spaces-myusername-test-predict%2F107806)._
