- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for GzipRoute (0.08 sec)
-
docs_src/custom_request_and_route/tutorial001.py
body = await super().body() if "gzip" in self.headers.getlist("Content-Encoding"): body = gzip.decompress(body) self._body = body return self._body class GzipRoute(APIRoute): def get_route_handler(self) -> Callable: original_route_handler = super().get_route_handler() async def custom_route_handler(request: Request) -> Response:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri May 13 23:38:22 UTC 2022 - 973 bytes - Viewed (0) -
docs/de/docs/how-to/custom-request-and-route.md
Auf diese Weise kann dieselbe Routenklasse gzip-komprimierte oder unkomprimierte Requests verarbeiten. ```Python hl_lines="8-15" {!../../docs_src/custom_request_and_route/tutorial001.py!} ``` ### 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.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 5.2K bytes - Viewed (0) -
docs/pt/docs/how-to/custom-request-and-route.md
Dessa forma, a mesma classe de rota pode lidar com requisições comprimidas ou não comprimidas. ```Python hl_lines="8-15" {!../../docs_src/custom_request_and_route/tutorial001.py!} ``` ### Criar uma classe `GzipRoute` personalizada Em seguida, criamos uma subclasse personalizada de `fastapi.routing.APIRoute` que fará uso do `GzipRequest`. Dessa vez, ele irá sobrescrever o método `APIRoute.get_route_handler()`.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Oct 22 17:33:00 UTC 2024 - 4.9K bytes - Viewed (0) -
docs/em/docs/how-to/custom-request-and-route.md
🚥 📤 🙅♂ `gzip` 🎚, ⚫️ 🔜 🚫 🔄 🗜 💪. 👈 🌌, 🎏 🛣 🎓 💪 🍵 🗜 🗜 ⚖️ 🗜 📨. ```Python hl_lines="8-15" {!../../docs_src/custom_request_and_route/tutorial001.py!} ``` ### ✍ 🛃 `GzipRoute` 🎓 ⏭, 👥 ✍ 🛃 🏿 `fastapi.routing.APIRoute` 👈 🔜 ⚒ ⚙️ `GzipRequest`. 👉 🕰, ⚫️ 🔜 📁 👩🔬 `APIRoute.get_route_handler()`. 👉 👩🔬 📨 🔢. & 👈 🔢 ⚫️❔ 🔜 📨 📨 & 📨 📨.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 3.6K bytes - Viewed (0) -
docs/en/docs/how-to/custom-request-and-route.md
That way, the same route class can handle gzip compressed or uncompressed requests. {* ../../docs_src/custom_request_and_route/tutorial001.py hl[8:15] *} ### 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()`.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 27 22:39:38 UTC 2024 - 4.3K bytes - Viewed (0)