cardano-community / koios-java-client

koios-java-client
https://www.koios.rest/
Apache License 2.0
18 stars 3 forks source link

Allow HTTP requests with data compression #149

Closed slux83 closed 11 months ago

slux83 commented 12 months ago

According to ATADA pool (see https://twitter.com/ATADA_Stakepool/status/1724341672413196617), with Koios it is possible to specify HTTP compression of data to improve the query response time. I had a look at the Koios Java code and it seems that it uses OKHttp client to build the HTTP requests and this would mean to add the HTTP header XXX at request build time. Indeed this could be enabled/disabled using env variables.

I believe it would be enough to simply add Accept-Encoding: deflate, gzip as header. image

slux83 commented 12 months ago

wow! that was fast