I have below code snippet which simply reads from form data and returns it.
@my_app.post("/items2/{item_id}")
def read_root(username: str = Form(...), password: str = Form(...)):
# return request.body()
return {"username": username, "password":password}
My question here is, is there any other way i can pick this data from request object ? I don't want to use form data here. Also my input data is not in json format so don't want to use the model also.
I have gone through the Fastapi docs and could not find something related to this.