|
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 ! |
Answered by
bojiang
Aug 23, 2020
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? |
0 replies
Answer selected by
parano
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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?