nodejs / undici

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

Interceptors: add response decompress interceptor #3255

Open metcoder95 opened 3 months ago

metcoder95 commented 3 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 3 months ago

cc: @ronag

adrianfalleiro commented 3 months ago

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

tsctx commented 3 months ago

PR welcome

adrianfalleiro commented 3 months ago

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