code: function buildStream (host, options, secure) {
    var stream = [];
  
    // accept options as a secure boolean
    if (options === true) {
      secure = true;
    }
  
    options = _.defaults(_.isObject(options) ? options : {}, {
      request  : {},
      response : {}
    });
  
    function applyStreamFunctions (funcSet) {
      _.each(funcSet || [], function (middleware) {
        if (_.isFunction(middleware)) {
          // wrapper allows us to call the callback without passing proxyObj
          stream.push(function asyncWrapper (proxyObj, callback) {
            return middleware(proxyObj, (error, _proxyObj) => callback(error, _proxyObj || proxyObj));
          });
        }
      });
    }
  
    // if there is `pre` middleware
    let preSet = options.pre;
    if (preSet) {
      // accept raw functions, but wrap it in an array
      preSet = _.isFunction(preSet) ? [preSet] : preSet;
      applyStreamFunctions(preSet);
    }
  
    // push the core request
    stream.push(proxyReq);
  
    // if there is `post` middleware
    let postSet = options.post;
    if (postSet) {
      // accept raw functions, but wrap it in an array
      postSet = _.isFunction(postSet) ? [postSet] : postSet;
      applyStreamFunctions(postSet);
    }
  
    if (secure) {
      options.request.forceHttps = true;
    }
  
    return stream;
  }
docs: construct the async waterfall stream  accept buildStream(host) OR buildStream(host, secureBool) OR buildStream(host, secureBool) OR buildStream(host, prefix, secureBool) OR buildStream(host, optionsObj)