Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 328 for gzip (0.15 sec)

  1. fastapi/middleware/gzip.py

    from starlette.middleware.gzip import GZipMiddleware as GZipMiddleware  # noqa...
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Sun Dec 20 18:50:00 GMT 2020
    - 79 bytes
    - Viewed (0)
  2. okhttp-logging-interceptor/src/test/java/okhttp3/logging/HttpLoggingInterceptorTest.kt

            .body(Buffer().writeUtf8("Uncompressed"))
            .build(),
        )
        val response =
          client.newCall(
            request()
              .addHeader("Content-Encoding", "gzip")
              .post("Uncompressed".toRequestBody().gzip())
              .build(),
          ).execute()
        val responseBody = response.body
        assertThat(responseBody.string(), "Expected response body to be valid")
          .isEqualTo("Uncompressed")
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 06 09:14:38 GMT 2024
    - 37.6K bytes
    - Viewed (0)
  3. docs_src/custom_request_and_route/tutorial001.py

    import gzip
    from typing import Callable, List
    
    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
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri May 13 23:38:22 GMT 2022
    - 973 bytes
    - Viewed (0)
  4. src/main/java/org/codelibs/curl/CurlRequest.java

    import java.util.logging.Logger;
    import java.util.zip.GZIPInputStream;
    
    import javax.net.ssl.HttpsURLConnection;
    import javax.net.ssl.SSLSocketFactory;
    
    import org.apache.commons.io.IOUtils;
    import org.codelibs.curl.Curl.Method;
    import org.codelibs.curl.io.ContentCache;
    import org.codelibs.curl.io.ContentOutputStream;
    
    public class CurlRequest {
    
        protected static final String GZIP = "gzip";
    
    Java
    - Registered: Thu Apr 25 15:34:08 GMT 2024
    - Last Modified: Sun Feb 12 12:21:25 GMT 2023
    - 12.3K bytes
    - Viewed (0)
  5. 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/"},
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Fri Apr 23 18:58:53 GMT 2021
    - 7.1K bytes
    - Viewed (0)
  6. src/main/java/jcifs/smb1/util/mime.map

    application/x-director         dcr              # Director File
    application/x-dvi              dvi              # TeX dvi Format
    application/x-gtar             gtar             # Gzip and Tar file
    application/x-gzip             gz tgz           # Gzip and Tar file
    application/x-compress         z                # Gzip and Tar file
    application/x-hdf              hdf              # NCSA HDF
    application/x-ica              ica              # WinFrames
    Plain Text
    - Registered: Sun Apr 21 00:10:10 GMT 2024
    - Last Modified: Fri Mar 22 20:39:42 GMT 2019
    - 5.9K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_custom_request_and_route/test_tutorial001.py

    import gzip
    import json
    
    import pytest
    from fastapi import Request
    from fastapi.testclient import TestClient
    
    from docs_src.custom_request_and_route.tutorial001 import app
    
    
    @app.get("/check-class")
    async def check_gzip_request(request: Request):
        return {"request_class": type(request).__name__}
    
    
    client = TestClient(app)
    
    
    @pytest.mark.parametrize("compress", [True, False])
    def test_gzip_request(compress):
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Sun Nov 13 14:26:09 GMT 2022
    - 886 bytes
    - Viewed (0)
  8. docs/en/docs/reference/middleware.md

    It can be imported from `fastapi`:
    
    ```python
    from fastapi.middleware.cors import CORSMiddleware
    ```
    
    ::: fastapi.middleware.gzip.GZipMiddleware
    
    It can be imported from `fastapi`:
    
    ```python
    from fastapi.middleware.gzip import GZipMiddleware
    ```
    
    ::: fastapi.middleware.httpsredirect.HTTPSRedirectMiddleware
    
    It can be imported from `fastapi`:
    
    ```python
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 991 bytes
    - Viewed (0)
  9. docs/en/docs/how-to/custom-request-and-route.md

    * Decompressing gzip-compressed request bodies.
    * Automatically logging all request bodies.
    
    ## Handling custom request body encodings
    
    Let's see how to make use of a custom `Request` subclass to decompress gzip requests.
    
    And an `APIRoute` subclass to use that custom request class.
    
    ### Create a custom `GzipRequest` class
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Sun Mar 31 23:52:53 GMT 2024
    - 4.4K bytes
    - Viewed (0)
  10. internal/s3select/progress.go

    		scannedReader: scannedReader,
    	}
    	var r io.Reader
    
    	switch compType {
    	case noneType:
    		r = scannedReader
    	case gzipType:
    		gzr, err := gzip.NewReader(scannedReader)
    		if err != nil {
    			if errors.Is(err, gzip.ErrHeader) || errors.Is(err, gzip.ErrChecksum) {
    				return nil, errInvalidCompression(err, compType)
    			}
    			return nil, errTruncatedInput(err)
    		}
    		r = gzr
    		pr.closer = gzr
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Oct 18 15:44:36 GMT 2021
    - 4.2K bytes
    - Viewed (0)
Back to top