- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for uncompress (0.18 sec)
-
docs/en/docs/how-to/custom-request-and-route.md
First, we create a `GzipRequest` class, which will overwrite the `Request.body()` method to decompress the body in the presence of an appropriate header. If there's no `gzip` in the header, it will not try to decompress the body. That way, the same route class can handle gzip compressed or uncompressed requests. ```Python hl_lines="8-15" {!../../../docs_src/custom_request_and_route/tutorial001.py!} ```
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) -
.github/workflows/test-redistribute.yml
run: pip install build - name: Build source distribution env: TIANGOLO_BUILD_PACKAGE: ${{ matrix.package }} run: python -m build --sdist - name: Decompress source distribution run: | cd dist tar xvf fastapi*.tar.gz - name: Install test dependencies run: | cd dist/fastapi*/
Others - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Apr 30 06:38:13 GMT 2024 - 1.4K bytes - Viewed (0) -
tests/test_tutorial/test_custom_request_and_route/test_tutorial001.py
return {"request_class": type(request).__name__} client = TestClient(app) @pytest.mark.parametrize("compress", [True, False]) def test_gzip_request(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"
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sun Nov 13 14:26:09 GMT 2022 - 886 bytes - Viewed (0)