code: function writeHttpResponse(path, res) {
      var responseStr = fs.readFileSync(path).toString();
      var response = JSON.parse(responseStr);
      var encoding = 'utf8';
      var contentType = response.contentType;
  
      var actualResponse = {};
  
      if(response.headers) {
        _.assign(actualResponse, response.headers);
      }
  
      if (response.contentType) {
        actualResponse['Content-Type'] = response.contentType;
      }
  
      if ('location' in response) {
        actualResponse['Location'] = response.location;
      }
  
      res.writeHead(response.statusCode, actualResponse);
  
      var data = response.data;
      if( contentType == 'image/jpeg' || contentType == 'image/jpg' || contentType == 'image/png' || contentType == 'image/gif' ) {
        data = new Buffer(data, 'base64');
      }
      else if (typeof data !== 'string') {
        data = JSON.stringify(data);
      } else if (response.isBase64) {
        data = new Buffer(data, 'base64');
      }
  
      res.write(data);
      res.end();
    }
docs: TODO: figure out how to buffer file stream into response