Getting binary content in Node.js using request
OK, after a lot of digging, I found out that requestSettings
should have:
encoding: null
And then body
will be of type Buffer
, instead of the default, which is string.
The accepted answer didn't solve my problem. I somehow figured that gzip: true
worked.