You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fromtypingimportAnyfromgzipimportdecompressasgzip_decompressfromfastapiimportRequestas_Requesttry:
importorjsonexceptImportError:
orjson=None# type: ignoreclassRequest(_Request):
""" Custom request class which uses `orjson` if present. Otherwise, it falls back to the standard FastAPI request. """asyncdefbody(self) ->bytes:
ifnothasattr(self, "_body"):
body=awaitsuper().body()
if"gzip"inself.headers.getlist("Content-Encoding"):
body=gzip_decompress(body)
self._body=bodyreturnself._bodyasyncdefjson(self) ->Any:
iforjsonisNone:
returnawaitsuper().json()
ifnothasattr(self, "_json"):
body=awaitself.body()
self._json=orjson.loads(body)
returnself._json
in Version 1.24 requests.py have value:
fromtypingimportAnyfromfastapiimportRequestas_Requesttry:
importorjsonexceptImportError:
orjson=None# type: ignoreclassRequest(_Request):
""" Custom request class which uses `orjson` if present. Otherwise, it falls back to the standard FastAPI request. """asyncdefjson(self) ->Any:
iforjsonisNone:
returnawaitsuper().json()
ifnothasattr(self, "_json"):
body=awaitself.body()
self._json=orjson.loads(body)
returnself._json
The text was updated successfully, but these errors were encountered:
These branches are internal branches used to prepare releases. PRs should only be merged against master.
Since #950 was merged after the 1.2.x release was out, it will need to wait until the 1.3.x release. In the meantime, if you want to try it out, you should be able to use our dev releases (e.g. 1.3.0.dev3).
Hi,
My pull requests was accepted #950 but in new versions I can't see gzip compress for incoming requests:
In master branch is: https://raw.githubusercontent.com/SeldonIO/MLServer/master/mlserver/rest/requests.py
in Version 1.24 requests.py have value:
The text was updated successfully, but these errors were encountered: