Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 21 - 30 of 929 for Directly (0.05 seconds)

  1. docs/ja/docs/advanced/using-request-directly.md

    # Request を直接使う { #using-the-request-directly }
    
    これまで、必要なリクエストの各部分を、その型とともに宣言してきました。
    
    次の場所からデータを取得します:
    
    - パスのパラメータ
    - ヘッダー
    - クッキー
    - など
    
    こうすることで、**FastAPI** はそのデータを検証し、変換し、API のドキュメントを自動生成します。
    
    しかし、`Request` オブジェクトに直接アクセスする必要がある場面もあります。
    
    ## `Request` オブジェクトの詳細 { #details-about-the-request-object }
    
    **FastAPI** は内部的には **Starlette** の上にいくつかのツール層を載せたものなので、必要に応じて Starlette の [`Request`](https://www.starlette.dev/requests/) オブジェクトを直接使えます。
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:07:17 GMT 2026
    - 2.8K bytes
    - Click Count (0)
  2. docs/fr/docs/advanced/using-request-directly.md

    # Utiliser Request directement { #using-the-request-directly }
    
    Jusqu'à présent, vous avez déclaré les parties de la requête dont vous avez besoin, avec leurs types.
    
    En récupérant des données depuis :
    
    * Le chemin, sous forme de paramètres.
    * En-têtes.
    * Cookies.
    * etc.
    
    Et ce faisant, **FastAPI** valide ces données, les convertit et génère automatiquement la documentation de votre API.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:37:13 GMT 2026
    - 2.5K bytes
    - Click Count (0)
  3. docs/ru/docs/advanced/using-request-directly.md

    # Прямое использование Request { #using-the-request-directly }
    
    До этого вы объявляли нужные части HTTP-запроса вместе с их типами.
    
    Извлекая данные из:
    
    * пути (как параметров),
    * HTTP-заголовков,
    * Cookie,
    * и т.д.
    
    Тем самым **FastAPI** валидирует эти данные, преобразует их и автоматически генерирует документацию для вашего API.
    
    Но бывают ситуации, когда нужно обратиться к объекту `Request` напрямую.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 17:56:20 GMT 2026
    - 3.7K bytes
    - Click Count (0)
  4. docs/zh-hant/docs/advanced/using-request-directly.md

    # 直接使用 Request { #using-the-request-directly }
    
    到目前為止,你都是用對應的型別來宣告你需要的請求各部分。
    
    例如從以下來源取得資料:
    
    - 路徑中的參數。
    - 標頭。
    - Cookies。
    - 等等。
    
    這麼做時,FastAPI 會自動驗證並轉換這些資料,還會為你的 API 產生文件。
    
    但有些情況你可能需要直接存取 `Request` 物件。
    
    ## 關於 `Request` 物件的細節 { #details-about-the-request-object }
    
    由於 FastAPI 底層其實是 Starlette,再加上一層工具,因此在需要時你可以直接使用 Starlette 的 [`Request`](https://www.starlette.dev/requests/) 物件。
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:05:38 GMT 2026
    - 2.1K bytes
    - Click Count (0)
  5. docs/en/docs/advanced/response-cookies.md

    You can also declare the `Response` parameter in dependencies, and set cookies (and headers) in them.
    
    ## Return a `Response` directly { #return-a-response-directly }
    
    You can also create cookies when returning a `Response` directly in your code.
    
    To do that, you can create a response as described in [Return a Response Directly](response-directly.md).
    
    Then set Cookies in it, and then return it:
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 18:13:19 GMT 2026
    - 2.2K bytes
    - Click Count (0)
  6. docs/en/docs/advanced/additional-status-codes.md

    To achieve that, import `JSONResponse`, and return your content there directly, setting the `status_code` that you want:
    
    {* ../../docs_src/additional_status_codes/tutorial001_an_py310.py hl[4,25] *}
    
    /// warning
    
    When you return a `Response` directly, like in the example above, it will be returned directly.
    
    It won't be serialized with a model, etc.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 18:13:19 GMT 2026
    - 2K bytes
    - Click Count (0)
  7. docs/en/docs/advanced/custom-response.md

    By default, **FastAPI** will return JSON responses.
    
    You can override it by returning a `Response` directly as seen in [Return a Response directly](response-directly.md).
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 18:13:19 GMT 2026
    - 11K bytes
    - Click Count (0)
  8. docs/en/docs/reference/request.md

    You can declare a parameter in a *path operation function* or dependency to be of type `Request` and then you can access the raw request object directly, without any validation, etc.
    
    Read more about it in the [FastAPI docs about using Request directly](https://fastapi.tiangolo.com/advanced/using-request-directly/)
    
    You can import it directly from `fastapi`:
    
    ```python
    from fastapi import Request
    ```
    
    /// tip
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Wed Feb 04 12:41:54 GMT 2026
    - 652 bytes
    - Click Count (0)
  9. docs/en/docs/reference/response.md

    You can also use it directly to create an instance of it and return it from your *path operations*.
    
    Read more about it in the [FastAPI docs about returning a custom Response](https://fastapi.tiangolo.com/advanced/response-directly/#returning-a-custom-response)
    
    You can import it directly from `fastapi`:
    
    ```python
    from fastapi import Response
    ```
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Wed Feb 04 12:41:54 GMT 2026
    - 559 bytes
    - Click Count (0)
  10. docs/en/docs/advanced/additional-responses.md

                * **FastAPI** adds a reference here to the global JSON Schemas in another place in your OpenAPI instead of including it directly. This way, other applications and clients can use those JSON Schemas directly, provide better code generation tools, etc.
    
    ///
    
    The generated responses in the OpenAPI for this *path operation* will be:
    
    ```JSON hl_lines="3-12"
    {
        "responses": {
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 18:13:19 GMT 2026
    - 8.8K bytes
    - Click Count (0)
Back to Top