-
Hi, I was wondering if you plan to support gzip decoding for JSON data that was gzipped and sent to the server with For the moment this seems not to be supported: $ echo '{"text": "blablabla"}]' | gzip | curl -X POST -H --data-binary @- -H "Content-Encoding: gzip" my-bentoml-server:5000/predict
>> {"message":"BentoService error handling API request: Request content-type must be 'application/json' for this BentoService API"} I guess this could be useful to reduce the size of large payloads (such a text data) sent over the network and thus would reduce the bandwidth load. Thank you for your answer ! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Hi @AlexDut! Great question and I don't think BentoML current support gzip encoding, and we should definitely add support for it. @bojiang @akainth015 this looks like something we want to consider in the new adapter refactoring that you guys are working on? |
Beta Was this translation helpful? Give feedback.
-
Sounds great! @parano Maybe we need to make it a generic method in order to implement it in each adapter? |
Beta Was this translation helpful? Give feedback.
-
For the future reference,#1015 added this feature. |
Beta Was this translation helpful? Give feedback.
Sounds great!
So I drafted an PR on the dev branch, as well as the unit test:
e07cfcd
@parano Maybe we need to make it a generic method in order to implement it in each adapter?