- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for and (0.12 sec)
-
docs/zh/docs/advanced/custom-request-and-route.md
```Python hl_lines="13 15" {!../../../docs_src/custom_request_and_route/tutorial002.py!} ``` 发生异常时,`Request` 实例仍在作用域内,因此处理错误时可以读取和使用请求体: ```Python hl_lines="16-18" {!../../../docs_src/custom_request_and_route/tutorial002.py!} ``` ## 在路由中自定义 `APIRoute` 类 您还可以设置 `APIRoute` 的 `route_class` 参数: ```Python hl_lines="26" {!../../../docs_src/custom_request_and_route/tutorial003.py!} ```
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) -
docs/de/docs/how-to/custom-request-and-route.md
```Python hl_lines="13 15" {!../../../docs_src/custom_request_and_route/tutorial002.py!} ``` Wenn eine Exception auftritt, befindet sich die `Request`-Instanz weiterhin im Gültigkeitsbereich, sodass wir den Requestbody lesen und bei der Fehlerbehandlung verwenden können: ```Python hl_lines="16-18" {!../../../docs_src/custom_request_and_route/tutorial002.py!} ``` ## Benutzerdefinierte `APIRoute`-Klasse in einem Router
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) -
docs/en/docs/how-to/custom-request-and-route.md
```Python hl_lines="8-15" {!../../../docs_src/custom_request_and_route/tutorial001.py!} ``` ### Create a custom `GzipRoute` class Next, we create a custom subclass of `fastapi.routing.APIRoute` that will make use of the `GzipRequest`. This time, it will overwrite the method `APIRoute.get_route_handler()`. This method returns a function. And that function is what will receive a request and return a response.
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) -
docs/em/docs/how-to/custom-request-and-route.md
```Python hl_lines="13 15" {!../../../docs_src/custom_request_and_route/tutorial002.py!} ``` 🚥 ⚠ 📉, `Request` 👐 🔜 ↔, 👥 💪 ✍ & ⚒ ⚙️ 📨 💪 🕐❔ 🚚 ❌: ```Python hl_lines="16-18" {!../../../docs_src/custom_request_and_route/tutorial002.py!} ``` ## 🛃 `APIRoute` 🎓 📻 👆 💪 ⚒ `route_class` 🔢 `APIRouter`: ```Python hl_lines="26" {!../../../docs_src/custom_request_and_route/tutorial003.py!} ```
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)