docs: function download(url, hostHeader, destinationFilename, callback) {
  	if (typeof destinationFilename === 'function') {
  		callback = destinationFilename;
  		destinationFilename = null;
  	}
  
  	let options = require('url').parse(url);
  	options.method = "GET";
  	options.headers = {
  		"Host": hostHeader,
  		"Accept": "text/html,*/*;q=0.9",
  		"Accept-Encoding": "gzip,identity,*;q=0",
  		"Accept-Charset": "ISO-8859-1,utf-8,*;q=0.7",
  		"User-Agent": "Valve/Steam HTTP Client 1.0"
  	};
  
  	let req = require('http').request(options, (res) => {
  		if (res.statusCode != 200) {
  			callback(new Error("HTTP error " + res.statusCode));
  			return;
  		}
  
  		res.setEncoding('binary'); // apparently using null just doesn't work... thanks node
  		let stream = res;
  
  		if (res.headers['content-encoding'] && res.headers['content-encoding'] == 'gzip') {
  			stream = require('zlib').createGunzip();
  			stream.setEncoding('binary');
  			res.pipe(stream);
  		}
  
  		let totalSizeBytes = parseInt(res.headers['content-length'] || 0, 10);
  		let receivedBytes = 0;
  		let dataBuffer = new Buffer(0);
  
  		if (destinationFilename) {
  			stream.pipe(require('fs').createWriteStream(destinationFilename));
  		}
  
  		stream.on('data', (chunk) => {
  			if (typeof chunk === 'string') {
  				chunk = new Buffer(chunk, 'binary');
  			}
  
  			receivedBytes += chunk.length;
  
  			if (!destinationFilename) {
  				dataBuffer = Buffer.concat([dataBuffer, chunk]);
  			}
  
  			callback(null, {"type": "progress", "receivedBytes": receivedBytes, "totalSizeBytes": totalSizeBytes});
  		});
  
  		stream.on('end', () => {
  			callback(null, {"type": "complete", "data": dataBuffer});
  		});
  	});
  
  	req.on('error', (err) => {
  		callback(err);
  	});
  
  	req.end();
  }