Nim: Httpclient getContent does not support Content-Encoding: gzip.

Created on 22 May 2018  路  2Comments  路  Source: nim-lang/Nim

If you ask a website "Accept-Encoding": "gzip, deflate, br" it will usually return it as Content-Encoding: gzip. httpclient and just gives you the zipped files instead. I would have expected it to unzip the file and return it like almost every other tool does.

Stdlib

Most helpful comment

I am working on a pure Nim implementation of deflate, gzip, zlib etc over here https://github.com/guzba/zippy (example httpclient gzip uncompress: https://github.com/guzba/zippy/blob/master/examples/http_client.nim)

All 2 comments

Happy to accept PRs. I'm pretty sure gzip is pretty tough though, you would need to depend on a C library or implement it in Nim natively.

I am working on a pure Nim implementation of deflate, gzip, zlib etc over here https://github.com/guzba/zippy (example httpclient gzip uncompress: https://github.com/guzba/zippy/blob/master/examples/http_client.nim)

Was this page helpful?
0 / 5 - 0 ratings