got icon indicating copy to clipboard operation
got copied to clipboard

Fault behavior with zstd content-encoding

Open mostafa8026 opened this issue 4 months ago • 0 comments

Describe the bug

  • Node.js version: v14.21.3
  • OS & version: ubuntu 24

We need to put zstd accpet-encoding header, but the got packge cannot handle it automatically. I tried to fix it using afterResponse like this:

response.body = Buffer.from(fzstd.decompress(response.rawBody)).toString();

But I have problem when I use responseType: 'json', my afterResponse is after the built-int json.parse. Give me some idea or a solution to have zstd?

mostafa8026 avatar Oct 12 '24 11:10 mostafa8026