Weird characters in body after request response Weird characters in body after request response express express

Weird characters in body after request response


Most likely the data you're seeing is compressed (with gzip) since you are sending a header that says you are willing to accept such a response. Set gzip: true in your request() options and request should automatically decompress the body passed to your callback.

Or just remove the 'accept-encoding': 'gzip, deflate, br' line in your headers object to not request gzip compression.


Removing "Accept-Encoding": "gzip,deflate" from header worked for me.