Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for Kass (0.47 sec)

  1. docs/de/docs/advanced/additional-responses.md

    Sie können beispielsweise einen zusätzlichen Medientyp `image/png` hinzufügen und damit deklarieren, dass Ihre *Pfadoperation* ein JSON-Objekt (mit dem Medientyp `application/json`) oder ein PNG-Bild zurückgeben kann:
    
    ```Python hl_lines="19-24  28"
    {!../../../docs_src/additional_responses/tutorial002.py!}
    ```
    
    !!! note "Hinweis"
        Beachten Sie, dass Sie das Bild direkt mit einer `FileResponse` zurückgeben müssen.
    
    !!! info
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 20:19:26 GMT 2024
    - 9.6K bytes
    - Viewed (0)
  2. docs/en/docs/advanced/additional-responses.md

    But for those additional responses you have to make sure you return a `Response` like `JSONResponse` directly, with your status code and content.
    
    ## Additional Response with `model`
    
    You can pass to your *path operation decorators* a parameter `responses`.
    
    It receives a `dict`, the keys are status codes for each response, like `200`, and the values are other `dict`s with the information for each of them.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Jan 11 16:31:18 GMT 2024
    - 8.8K bytes
    - Viewed (0)
Back to top