Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for body (0.14 sec)

  1. docs/de/docs/how-to/custom-request-and-route.md

    Zuerst erstellen wir eine `GzipRequest`-Klasse, welche die Methode `Request.body()` überschreibt, um den Body bei Vorhandensein eines entsprechenden Headers zu dekomprimieren.
    
    Wenn der Header kein `gzip` enthält, wird nicht versucht, den Body zu dekomprimieren.
    
    Auf diese Weise kann dieselbe Routenklasse gzip-komprimierte oder unkomprimierte Requests verarbeiten.
    
    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)
  2. docs/zh/docs/advanced/custom-request-and-route.md

    如此一来,`GzipRequest` 把数据传递给*路径操作*前,就会解压数据(如需)。
    
    之后,所有处理逻辑都一样。
    
    但因为改变了 `GzipRequest.body`,**FastAPI** 加载请求体时会自动解压。
    
    ## 在异常处理器中访问请求体
    
    !!! tip "提示"
    
        为了解决同样的问题,在 `RequestValidationError` 的自定义处理器使用 `body`  ([处理错误](../tutorial/handling-errors.md#use-the-requestvalidationerror-body){.internal-link target=_blank})可能会更容易。
    
        但本例仍然可行,而且本例展示了如何与内部组件进行交互。
    
    同样也可以在异常处理器中访问请求体。
    
    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)
  3. docs/en/docs/how-to/custom-request-and-route.md

    But because of our changes in `GzipRequest.body`, the request body will be automatically decompressed when it is loaded by **FastAPI** when needed.
    
    ## Accessing the request body in an exception handler
    
    !!! tip
        To solve this same problem, it's probably a lot easier to use the `body` in a custom handler for `RequestValidationError` ([Handling Errors](../tutorial/handling-errors.md#use-the-requestvalidationerror-body){.internal-link target=_blank}).
    
    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)
  4. docs/em/docs/how-to/custom-request-and-route.md

    🔨 👉, 👆 `GzipRequest` 🔜 ✊ 💅 🗜 📊 (🚥 💪) ⏭ 🚶‍♀️ ⚫️ 👆 *➡ 🛠️*.
    
    ⏮️ 👈, 🌐 🏭 ⚛ 🎏.
    
    ✋️ ↩️ 👆 🔀 `GzipRequest.body`, 📨 💪 🔜 🔁 🗜 🕐❔ ⚫️ 📐 **FastAPI** 🕐❔ 💪.
    
    ## 🔐 📨 💪 ⚠ 🐕‍🦺
    
    !!! tip
        ❎ 👉 🎏 ⚠, ⚫️ 🎲 📚 ⏩ ⚙️ `body` 🛃 🐕‍🦺 `RequestValidationError` ([🚚 ❌](../tutorial/handling-errors.md#requestvalidationerror){.internal-link target=_blank}).
    
        ✋️ 👉 🖼 ☑ & ⚫️ 🎦 ❔ 🔗 ⏮️ 🔗 🦲.
    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)
Back to top