Jat*_*tra 0 python json python-3.x fastapi
我正在尝试使用 FastAPI 从我的 POST 请求中读取正文。但是我无法理解(...)Body 函数的论据是什么
这是我的代码:
@app.post('/createPosts')
def create_post(payload: dict = Body(...)):
print(payload)
return {'message': 'succesfully created post'}
Run Code Online (Sandbox Code Playgroud)