When you need to receive form fields instead of JSON, you can use Form . Info ... from fastapi import FastAPI, Form app = FastAPI() @app.post("/login/") async def ... For example, in one of the ways the OAuth2 specification can be used (called ...
fastapi-post-json-example
Sep 7, 2019 — Description How can I capture the whole body of a POST operation (posted as application/json) as a single JSON var, without necessarily knowing the incoming schema? ... tiangolo / fastapi. Sponsor ... I guess, I'll have to open a separate issue for this when I can create a minimum viable example. Thanks! 3925e8d270
fastapi post json example
Comments