- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 140 for GZIP (0.01 sec)
-
docs_src/custom_request_and_route/tutorial001_py310.py
import gzip from collections.abc import Callable from fastapi import Body, FastAPI, Request, Response from fastapi.routing import APIRoute class GzipRequest(Request): async def body(self) -> bytes: if not hasattr(self, "_body"): body = await super().body() if "gzip" in self.headers.getlist("Content-Encoding"): body = gzip.decompress(body) self._body = body
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 10 08:55:32 UTC 2025 - 976 bytes - Viewed (0) -
docs_src/custom_request_and_route/tutorial001_py39.py
import gzip from typing import Callable from fastapi import Body, FastAPI, Request, Response from fastapi.routing import APIRoute class GzipRequest(Request): async def body(self) -> bytes: if not hasattr(self, "_body"): body = await super().body() if "gzip" in self.headers.getlist("Content-Encoding"): body = gzip.decompress(body) self._body = body return self._body
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 10 08:55:32 UTC 2025 - 967 bytes - Viewed (0) -
docs_src/custom_request_and_route/tutorial001_an_py310.py
import gzip from collections.abc import Callable from typing import Annotated from fastapi import Body, FastAPI, Request, Response from fastapi.routing import APIRoute class GzipRequest(Request): async def body(self) -> bytes: if not hasattr(self, "_body"): body = await super().body() if "gzip" in self.headers.getlist("Content-Encoding"): body = gzip.decompress(body)
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 10 08:55:32 UTC 2025 - 1015 bytes - Viewed (0) -
docs/de/docs/how-to/custom-request-and-route.md
* Dekomprimierung gzip-komprimierter Requestbodys. * Automatisches Loggen aller Requestbodys. ## Handhaben von benutzerdefinierten Requestbody-Kodierungen { #handling-custom-request-body-encodings } Sehen wir uns an, wie Sie eine benutzerdefinierte `Request`-Unterklasse verwenden, um gzip-Requests zu dekomprimieren.Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 10 13:54:34 UTC 2025 - 5.7K bytes - Viewed (0) -
tests/test_tutorial/test_custom_request_and_route/test_tutorial001.py
def test_gzip_request(client: TestClient, compress): n = 1000 headers = {} body = [1] * n data = json.dumps(body).encode() if compress: data = gzip.compress(data) headers["Content-Encoding"] = "gzip" headers["Content-Type"] = "application/json" response = client.post("/sum", content=data, headers=headers) assert response.json() == {"sum": n}
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 1.3K bytes - Viewed (0) -
docs/es/docs/how-to/custom-request-and-route.md
* Descomprimir cuerpos de requests comprimidos con gzip. * Registrar automáticamente todos los request bodies. ## Manejo de codificaciones personalizadas de request body { #handling-custom-request-body-encodings } Veamos cómo hacer uso de una subclase personalizada de `Request` para descomprimir requests gzip. Y una subclase de `APIRoute` para usar esa clase de request personalizada.Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Tue Dec 16 16:33:45 UTC 2025 - 5K bytes - Viewed (0) -
okhttp/src/commonTest/kotlin/okhttp3/CompressionInterceptorTest.kt
} @Test fun gzipThroughCall() { val gzip = CompressionInterceptor(Gzip) val client = clientTestRule .newClientBuilder() .addInterceptor(gzip) .addInterceptor { chain -> assertThat(chain.request().header("Accept-Encoding")).isEqualTo("gzip") Response .Builder() .request(chain.request())
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Fri Aug 01 06:04:22 UTC 2025 - 3K bytes - Viewed (0) -
docs/de/docs/advanced/middleware.md
## `GZipMiddleware` { #gzipmiddleware } Verarbeitet GZip-Responses für alle Requests, die `"gzip"` im `Accept-Encoding`-Header enthalten. Diese Middleware verarbeitet sowohl Standard- als auch Streaming-Responses. {* ../../docs_src/advanced_middleware/tutorial003_py39.py hl[2,6] *}Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 5.1K bytes - Viewed (0) -
okhttp-zstd/src/test/java/okhttp3/zstd/ZstdInterceptorJavaTest.java
*/ package okhttp3.zstd; import okhttp3.CompressionInterceptor; import okhttp3.Gzip; import okhttp3.brotli.Brotli; import org.junit.jupiter.api.Test; class ZstdInterceptorJavaTest { @Test public void testConstructor() { CompressionInterceptor interceptor = new CompressionInterceptor( Zstd.INSTANCE, Gzip.INSTANCE, Brotli.INSTANCE ); }Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Fri Aug 01 06:04:22 UTC 2025 - 969 bytes - Viewed (0) -
cmd/api-resources_test.go
"fetch-owner": []string{"true"}, "max-keys": []string{"100"}, "encoding-type": []string{"gzip"}, }, prefix: "photos/", token: "token", startAfter: "start-after", delimiter: SlashSeparator, fetchOwner: true, maxKeys: 100, encodingType: "gzip", errCode: ErrNone, }, { values: url.Values{ "prefix": []string{"photos/"},Registered: Sun Dec 28 19:28:13 UTC 2025 - Last Modified: Fri Apr 23 18:58:53 UTC 2021 - 7.1K bytes - Viewed (0)