Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for FormData (0.11 sec)

  1. docs/en/docs/release-notes.md

    from fastapi import FastAPI, Form
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class FormData(BaseModel):
        username: str
        password: str
        model_config = {"extra": "forbid"}
    
    
    @app.post("/login/")
    async def login(data: Annotated[FormData, Form()]):
        return data
    ```
    
    Registered: Sun Oct 27 07:19:11 UTC 2024
    - Last Modified: Sat Oct 26 16:51:17 UTC 2024
    - 449.4K bytes
    - Viewed (0)
Back to top