Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 72 for GZIP (0.01 sec)

  1. okhttp/src/commonJvmAndroid/kotlin/okhttp3/Gzip.kt

     */
    package okhttp3
    
    import okhttp3.CompressionInterceptor.DecompressionAlgorithm
    import okio.BufferedSource
    import okio.GzipSource
    import okio.Source
    
    object Gzip : DecompressionAlgorithm {
      override val encoding: String get() = "gzip"
    
      override fun decompress(compressedSource: BufferedSource): Source = GzipSource(compressedSource)
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Tue Oct 07 15:15:28 UTC 2025
    - 936 bytes
    - Viewed (0)
  2. docs/ru/docs/how-to/custom-request-and-route.md

    * Распаковка тел запросов, сжатых с помощью gzip.
    * Автоматическое логирование всех тел запросов.
    
    ## Обработка пользовательского кодирования тела запроса { #handling-custom-request-body-encodings }
    
    Посмотрим как использовать пользовательский подкласс `Request` для распаковки gzip-запросов.
    
    И подкласс `APIRoute`, чтобы использовать этот пользовательский класс запроса.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Thu Dec 11 21:25:03 UTC 2025
    - 7.2K bytes
    - Viewed (0)
  3. okhttp-brotli/src/main/kotlin/okhttp3/brotli/BrotliInterceptor.kt

    package okhttp3.brotli
    
    import okhttp3.CompressionInterceptor
    import okhttp3.Gzip
    
    /**
     * Transparent Brotli response support.
     *
     * Adds Accept-Encoding: br to request and checks (and strips) for Content-Encoding: br in
     * responses.  n.b. this replaces the transparent gzip compression in BridgeInterceptor.
     */
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Tue Oct 07 15:15:28 UTC 2025
    - 979 bytes
    - Viewed (0)
  4. docs/es/docs/advanced/middleware.md

    ## `GZipMiddleware` { #gzipmiddleware }
    
    Maneja responses GZip para cualquier request que incluya `"gzip"` en el header `Accept-Encoding`.
    
    El middleware manejará tanto responses estándar como en streaming.
    
    {* ../../docs_src/advanced_middleware/tutorial003_py39.py hl[2,6] *}
    
    Se soportan los siguientes argumentos:
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 4.7K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_advanced_middleware/test_tutorial003.py

    
    client = TestClient(app)
    
    
    def test_middleware():
        response = client.get("/large", headers={"accept-encoding": "gzip"})
        assert response.status_code == 200, response.text
        assert response.text == "x" * 4000
        assert response.headers["Content-Encoding"] == "gzip"
        assert int(response.headers["Content-Length"]) < 4000
        response = client.get("/")
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 670 bytes
    - Viewed (0)
  6. 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)
  7. 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)
  8. 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)
  9. 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)
  10. 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)
Back to top