Search Options

Results per page
Sort
Preferred Languages
Advance

Results 121 - 130 of 136 for JSONResponse (0.06 sec)

  1. fastapi/applications.py

                async def openapi(req: Request) -> JSONResponse:
                    root_path = req.scope.get("root_path", "").rstrip("/")
                    if root_path not in server_urls:
                        if root_path and self.root_path_in_servers:
                            self.servers.insert(0, {"url": root_path})
                            server_urls.add(root_path)
                    return JSONResponse(self.openapi())
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 21:25:59 UTC 2025
    - 176.3K bytes
    - Viewed (0)
  2. docs/ru/docs/tutorial/handling-errors.md

    ```JSON
    {"message": "Oops! yolo did something. There goes a rainbow..."}
    ```
    
    /// note | Технические детали
    
    Также можно использовать `from starlette.requests import Request` и `from starlette.responses import JSONResponse`.
    
    **FastAPI** предоставляет тот же `starlette.responses`, что и `fastapi.responses`, просто для удобства разработчика. Однако большинство доступных ответов поступает непосредственно из Starlette. То же самое касается и `Request`.
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 14.1K bytes
    - Viewed (0)
  3. docs/uk/docs/tutorial/handling-errors.md

    ```JSON
    {"message": "Oops! yolo did something. There goes a rainbow..."}
    ```
    
    /// note | Технічні деталі
    
    Ви також можете використовувати `from starlette.requests import Request` і `from starlette.responses import JSONResponse`.
    
    **FastAPI** надає ті самі `starlette.responses`, що й `fastapi.responses`, просто для зручності розробника. Але більшість доступних відповідей надходять безпосередньо зі Starlette. Те ж саме стосується і `Request`.
    
    ///
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Oct 11 17:48:49 UTC 2025
    - 13.9K bytes
    - Viewed (0)
  4. tests/test_include_router_defaults_overrides.py

    from fastapi.responses import JSONResponse
    from fastapi.testclient import TestClient
    
    
    class ResponseLevel0(JSONResponse):
        media_type = "application/x-level-0"
    
    
    class ResponseLevel1(JSONResponse):
        media_type = "application/x-level-1"
    
    
    class ResponseLevel2(JSONResponse):
        media_type = "application/x-level-2"
    
    
    class ResponseLevel3(JSONResponse):
        media_type = "application/x-level-3"
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 358.6K bytes
    - Viewed (0)
  5. docs/de/docs/tutorial/handling-errors.md

    ```JSON
    {"message": "Oops! yolo did something. There goes a rainbow..."}
    ```
    
    /// note | Technische Details
    
    Sie könnten auch `from starlette.requests import Request` und `from starlette.responses import JSONResponse` verwenden.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 10.4K bytes
    - Viewed (0)
  6. docs/pt/docs/tutorial/handling-errors.md

    ```JSON
    {"message": "Oops! yolo did something. There goes a rainbow..."}
    ```
    
    /// note | Detalhes Técnicos
    
    Você também pode usar `from starlette.requests import Request` e `from starlette.responses import JSONResponse`.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 10.2K bytes
    - Viewed (0)
  7. docs/es/docs/tutorial/handling-errors.md

    ```JSON
    {"message": "Oops! yolo did something. There goes a rainbow..."}
    ```
    
    /// note | Nota Técnica
    
    También podrías usar `from starlette.requests import Request` y `from starlette.responses import JSONResponse`.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 9.7K bytes
    - Viewed (0)
  8. docs/en/docs/tutorial/handling-errors.md

    ```JSON
    {"message": "Oops! yolo did something. There goes a rainbow..."}
    ```
    
    /// note | Technical Details
    
    You could also use `from starlette.requests import Request` and `from starlette.responses import JSONResponse`.
    
    **FastAPI** provides the same `starlette.responses` as `fastapi.responses` just as a convenience for you, the developer. But most of the available responses come directly from Starlette. The same with `Request`.
    
    ///
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 9K bytes
    - Viewed (0)
  9. docs/en/docs/tutorial/response-model.md

    This simple case is handled automatically by FastAPI because the return type annotation is the class (or a subclass of) `Response`.
    
    And tools will also be happy because both `RedirectResponse` and `JSONResponse` are subclasses of `Response`, so the type annotation is correct.
    
    ### Annotate a Response Subclass { #annotate-a-response-subclass }
    
    You can also use a subclass of `Response` in the type annotation:
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 20 15:55:38 UTC 2025
    - 15.5K bytes
    - Viewed (0)
  10. docs/pt/docs/tutorial/response-model.md

    Este caso simples é tratado automaticamente pelo FastAPI porque a anotação do tipo de retorno é a classe (ou uma subclasse de) `Response`.
    
    E as ferramentas também ficarão felizes porque `RedirectResponse` e ​​`JSONResponse` são subclasses de `Response`, então a anotação de tipo está correta.
    
    ### Anote uma subclasse de Response { #annotate-a-response-subclass }
    
    Você também pode usar uma subclasse de `Response` na anotação de tipo:
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 17.3K bytes
    - Viewed (0)
Back to top