Request doesn't decompress Brotli responses and calls JSON.parse before we have a chance to decompress it. The solution is to parse the response as JSON ourselves whenever the json option is truthy, following request's example to match the expected behavior.
I had to adjust lib/brotli.js since a test was modifying it's state and causing the new tests to fail.
Request doesn't decompress Brotli responses and calls JSON.parse before we have a chance to decompress it. The solution is to parse the response as JSON ourselves whenever the
json
option is truthy, following request's example to match the expected behavior.I had to adjust
lib/brotli.js
since a test was modifying it's state and causing the new tests to fail.