I am building some small scale application with FastAPI(newbie) and python. I am trying to add post request to my application but everytime i try to make a post request it shows invalid header with 400 status (bad request), Can anyone help me resolve this?below is my method for post request-
from fastapi import APIRouter, HTTPException, Request from fastapi.responses import JSONResponse router = APIRouter()#new the get req@router.get("/productlist")async def get_data(path: str):#does something works fine#now the post req@router.post("/test")async def upload_data():#this never gets hit i dont understand why#I tried printing some values at start of the function still no luck
i get following response