//gunZipSync sample var frisby=require('frisby'); var zlib = require('zlib'); var tc01 = frisby.create('Gzip Test'); tc01.get('http://httpbin.org/gzip', { encoding: null} ) .after(function(error, response, body){ if (!error && response.statusCode == 200) { var encoding = response.headers['content-encoding'] if (encoding && encoding.indexOf('gzip') > -1) { console.log(zlib.gunzipSync(body).toString('utf-8')); } else { console.log("Response encoding is not gzip"); } } }) .toss();