code: function _responseConsumer(logger, description, okCode1, failure, success, okCode2) {
  
    'use strict';
  
    return function consume(response) {
      response.setEncoding('utf8');
      var body = '';
      response.on('data', function (chunk) {
        body += chunk;
      });
      response.on('end', function () {
  
        logger.log('response consumer (' + description + ') got code ' + response.statusCode + ' and body:\n' + body);
  
        // Check for errors.
        if (response.statusCode !== okCode1 && response.statusCode !== okCode2) {
          var message = 'Got statusCode ' + response.statusCode + ' ' + description + '.' + '\n' + body;
  
          if (typeof failure === 'object' && typeof failure.emit === 'function') {
            failure.emit('error', message);
          } else {
            failure(response, message);
          }
        } else if (success) {
          success(body);
        }
      });
    };
  }
docs: Returns a function that will consume a response, check for the proper status code(s), and report errors.  The success function and the second acceptable status code are optional.  If the status code is correct and there's a success function, it will be called with the response's body passed in.  The failure argument can either be an EventEmitter (to emit an error event on) or a callback function.  If the failure argument is a callback function, it will be invoked with the response and an error message.