Search Options

Results per page
Sort
Preferred Languages
Advance

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

  1. fastapi/dependencies/utils.py

    from pydantic.fields import FieldInfo
    from starlette.background import BackgroundTasks as StarletteBackgroundTasks
    from starlette.concurrency import run_in_threadpool
    from starlette.datastructures import (
        FormData,
        Headers,
        ImmutableMultiDict,
        QueryParams,
        UploadFile,
    )
    from starlette.requests import HTTPConnection, Request
    from starlette.responses import Response
    from starlette.websockets import WebSocket
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 27 21:46:26 UTC 2024
    - 34.7K bytes
    - Viewed (0)
  2. 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 Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Nov 01 11:25:57 UTC 2024
    - 460.3K bytes
    - Viewed (0)
Back to top