nodejs / undici

An HTTP/1.1 client, written from scratch for Node.js
https://nodejs.github.io/undici
MIT License
6.3k stars 551 forks source link

Interceptors: add response decompress interceptor #3255

Open metcoder95 opened 6 months ago

metcoder95 commented 6 months ago

This would solve...

Decompression of compressed responses based on content-encoding header.

The implementation should look like...

Implemented as interceptor

Additional context

Ref: https://github.com/nodejs/undici/discussions/3253#discussion-6660897

metcoder95 commented 6 months ago

cc: @ronag

adrianfalleiro commented 6 months ago

Will you accept a PR for this? I would like to implement this

tsctx commented 6 months ago

PR welcome

adrianfalleiro commented 6 months ago

Ok made a first pass at this. Please take a look https://github.com/nodejs/undici/pull/3274