Force webserver to return uncompressed data (No gzip)

Viewed 2398

I am using http node.js module to make http requests. I want to force the webserver to return uncompressed data. [No gzip, No deflate].

Request headers

headers: {
  'Accept-Encoding': 'gzip,deflate,sdch',
  'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/31.0.1650.57 Chrome/31.0.1650.57 Safari/537.36',
}

I tried using this 'Accept-Encoding': '*;q=1,gzip=0' but no luck.

I see two approaches:

  1. Force the webserver to return uncompressed data.
  2. Unzip the compressed data using some nodeJs module

I want to go for #1.

1 Answers
Related