I'm using FastAPI with Uvicorn to implement a u-service which accepts a json payload in the request's body. Since the request body can be quite large, I wish the service to accept gzipped. How do I accomplish that?
So far the following:
- added the GZipMiddleware, but it encodes responses, rather that decoding requests
- added a 'Content-Encoding: gzip' to my request
Fail with response:
Status: 400 Bad Request
{ "detail": "There was an error parsing the body" }