Weird characters in body after request response
Removing "Accept-Encoding": "gzip,deflate" from header worked for me.
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.