- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for get_route_handler (0.17 sec)
-
docs/zh/docs/advanced/custom-request-and-route.md
{!../../../docs_src/custom_request_and_route/tutorial001.py!} ``` ### 创建自定义 `GzipRoute` 类 接下来,创建使用 `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 "技术细节"
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
### Eine benutzerdefinierte `GzipRoute`-Klasse erstellen Als Nächstes erstellen wir eine benutzerdefinierte Unterklasse von `fastapi.routing.APIRoute`, welche `GzipRequest` nutzt. Dieses Mal wird die Methode `APIRoute.get_route_handler()` überschrieben. Diese Methode gibt eine Funktion zurück. Und diese Funktion empfängt einen Request und gibt eine Response zurück.
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
``` ### 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. Here we use it to create a `GzipRequest` from the original request. ```Python hl_lines="18-26"
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="8-15" {!../../../docs_src/custom_request_and_route/tutorial001.py!} ``` ### ✍ 🛃 `GzipRoute` 🎓 ⏭, 👥 ✍ 🛃 🏿 `fastapi.routing.APIRoute` 👈 🔜 ⚒ ⚙️ `GzipRequest`. 👉 🕰, ⚫️ 🔜 📁 👩🔬 `APIRoute.get_route_handler()`. 👉 👩🔬 📨 🔢. & 👈 🔢 ⚫️❔ 🔜 📨 📨 & 📨 📨. 📥 👥 ⚙️ ⚫️ ✍ `GzipRequest` ⚪️➡️ ⏮️ 📨. ```Python hl_lines="18-26" {!../../../docs_src/custom_request_and_route/tutorial001.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)