fetch() appears to return the raw gzip-compressed response body instead of transparently decompressing it.
Minimal repro:
const res = await fetch('https://httpbin.org/gzip')
console.log(res.status)
console.log(res.headers.get('content-encoding'))
console.log(await res.text())
Observed:
200
gzip
<binary gzip data>
Expected:
200
gzip
{
"gzipped": true,
...
}
Response.text() should expose the decompressed body.
fetch()appears to return the raw gzip-compressed response body instead of transparently decompressing it.Minimal repro:
Observed:
Expected:
200 gzip { "gzipped": true, ... }Response.text()should expose the decompressed body.