You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried using node-fetch and axios and it worked without a need to manually intercept it and Im guessing that behind the scenes you are using Node's http module that have the zlib module that handles gzip and etc... so what am I missing here?
Checklist
[V] I have searched through GitHub issues for similar issues.
[V] I have completely read through the README and documentation.
[V] I have tested my code with the latest version of Node.js and this package and confirmed it is still not working.
The text was updated successfully, but these errors were encountered:
Describe the bug
Node.js version: Node 14, 16, 18, 20
OS version: Mac Ventura 3.0.1
Description: It seems like its not possible to receive a response body when the content is compressed using Brotli compression.
Actual behavior
SyntaxError: Unexpected token in JSON at position 0
since the body isn't decompressedExpected behavior
Body decompressed from Brotli and JSON is returned
Code to reproduce
I tried this simple code:
And got
SyntaxError: Unexpected token in JSON at position 0
since the body isn't decompressedWhen I tried to manually decompress it like that:
It worked and I got the proper result:
I tried using
node-fetch
andaxios
and it worked without a need to manually intercept it and Im guessing that behind the scenes you are using Node'shttp
module that have thezlib
module that handles gzip and etc... so what am I missing here?Checklist
The text was updated successfully, but these errors were encountered: