Skip to content

Fault behavior with zstd content-encodingΒ #2383

Open
@mostafa8026

Description

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?

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions