Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 60 for 26 (0.15 sec)

  1. docs/zh/docs/advanced/middleware.md

    ## `HTTPSRedirectMiddleware`
    
    强制所有传入请求必须是 `https` 或 `wss`。
    
    任何传向 `http` 或 `ws` 的请求都会被重定向至安全方案。
    
    ```Python hl_lines="2  6"
    {!../../../docs_src/advanced_middleware/tutorial001.py!}
    ```
    
    ## `TrustedHostMiddleware`
    
    强制所有传入请求都必须正确设置 `Host` 请求头,以防 HTTP 主机头攻击。
    
    ```Python hl_lines="2  6-8"
    {!../../../docs_src/advanced_middleware/tutorial002.py!}
    ```
    
    支持以下参数:
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 22:44:27 GMT 2024
    - 3.6K bytes
    - Viewed (0)
  2. docs/de/docs/how-to/custom-request-and-route.md

    Diese Methode gibt eine Funktion zurück. Und diese Funktion empfängt einen Request und gibt eine Response zurück.
    
    Hier verwenden wir sie, um aus dem ursprünglichen Request einen `GzipRequest` zu erstellen.
    
    ```Python hl_lines="18-26"
    {!../../../docs_src/custom_request_and_route/tutorial001.py!}
    ```
    
    !!! note "Technische Details"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 18:18:23 GMT 2024
    - 5.2K bytes
    - Viewed (0)
  3. docs/de/docs/advanced/middleware.md

    ```Python hl_lines="2  6"
    {!../../../docs_src/advanced_middleware/tutorial001.py!}
    ```
    
    ## `TrustedHostMiddleware`
    
    Erzwingt, dass alle eingehenden Requests einen korrekt gesetzten `Host`-Header haben, um sich vor HTTP-Host-Header-Angriffen zu schützen.
    
    ```Python hl_lines="2  6-8"
    {!../../../docs_src/advanced_middleware/tutorial002.py!}
    ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 20:18:15 GMT 2024
    - 4.4K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/idn/Punycode.kt

              else -> c.code
            }
          i++
        }
        return result
      }
    
      private val Int.punycodeDigit: Int
        get() =
          when {
            this < 26 -> this + 'a'.code
            this < 36 -> (this - 26) + '0'.code
            else -> error("unexpected digit: $this")
          }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 03 03:04:50 GMT 2024
    - 8.5K bytes
    - Viewed (0)
  5. docs/en/docs/how-to/custom-request-and-route.md

    This method returns a function. And that function is what will receive a request and return a response.
    
    Here we use it to create a `GzipRequest` from the original request.
    
    ```Python hl_lines="18-26"
    {!../../../docs_src/custom_request_and_route/tutorial001.py!}
    ```
    
    !!! note "Technical Details"
        A `Request` has a `request.scope` attribute, that's just a Python `dict` containing the metadata related to the request.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sun Mar 31 23:52:53 GMT 2024
    - 4.4K bytes
    - Viewed (0)
  6. docs/em/docs/how-to/custom-request-and-route.md

    👉 🕰, ⚫️ 🔜 📁 👩‍🔬 `APIRoute.get_route_handler()`.
    
    👉 👩‍🔬 📨 🔢. &amp; 👈 🔢 ⚫️❔ 🔜 📨 📨 &amp; 📨 📨.
    
    📥 👥 ⚙️ ⚫️ ✍ `GzipRequest` ⚪️➡️ ⏮️ 📨.
    
    ```Python hl_lines="18-26"
    {!../../../docs_src/custom_request_and_route/tutorial001.py!}
    ```
    
    !!! note "📡 ℹ"
         `Request` ✔️ `request.scope` 🔢, 👈 🐍 `dict` ⚗ 🗃 🔗 📨.
    
         `Request` ✔️ `request.receive`, 👈 🔢 "📨" 💪 📨.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 3.6K bytes
    - Viewed (0)
  7. docs/de/docs/tutorial/static-files.md

    ## `StaticFiles` verwenden
    
    * Importieren Sie `StaticFiles`.
    * „Mounten“ Sie eine `StaticFiles()`-Instanz in einem bestimmten Pfad.
    
    ```Python hl_lines="2  6"
    {!../../../docs_src/static_files/tutorial001.py!}
    ```
    
    !!! note "Technische Details"
        Sie könnten auch `from starlette.staticfiles import StaticFiles` verwenden.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 20:27:14 GMT 2024
    - 1.9K bytes
    - Viewed (0)
  8. docs/en/docs/advanced/path-operation-advanced-configuration.md

    === "Pydantic v2"
    
        ```Python hl_lines="26-33"
        {!> ../../../docs_src/path_operation_advanced_configuration/tutorial007.py!}
        ```
    
    === "Pydantic v1"
    
        ```Python hl_lines="26-33"
        {!> ../../../docs_src/path_operation_advanced_configuration/tutorial007_pv1.py!}
        ```
    
    !!! info
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 7.7K bytes
    - Viewed (0)
  9. docs/zh/docs/advanced/custom-request-and-route.md

    接下来,创建使用 `GzipRequest` 的 `fastapi.routing.APIRoute  ` 的自定义子类。
    
    此时,这个自定义子类会覆盖 `APIRoute.get_route_handler()`。
    
    `APIRoute.get_route_handler()` 方法返回的是函数,并且返回的函数接收请求并返回响应。
    
    本例用它根据原始请求创建 `GzipRequest`。
    
    ```Python hl_lines="18-26"
    {!../../../docs_src/custom_request_and_route/tutorial001.py!}
    ```
    
    !!! note "技术细节"
    
        `Request` 的 `request.scope` 属性是包含关联请求元数据的字典。
    
        `Request` 的 `request.receive` 方法是**接收**请求体的函数。
    
    Plain Text
    - Registered: Sun Mar 31 07:19:09 GMT 2024
    - Last Modified: Sat Mar 30 22:45:40 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  10. docs/en/docs/tutorial/schema-extra-example.md

    === "Python 3.10+ Pydantic v1"
    
        ```Python hl_lines="13-23"
        {!> ../../../docs_src/schema_extra_example/tutorial001_py310_pv1.py!}
        ```
    
    === "Python 3.8+ Pydantic v2"
    
        ```Python hl_lines="15-26"
        {!> ../../../docs_src/schema_extra_example/tutorial001.py!}
        ```
    
    === "Python 3.8+ Pydantic v1"
    
        ```Python hl_lines="15-25"
        {!> ../../../docs_src/schema_extra_example/tutorial001_pv1.py!}
        ```
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 11.8K bytes
    - Viewed (0)
Back to top