code: function(middlewares, method, request, response_middlewares, callback) {
          var that = this;
          try {
              var middleware = middlewares.shift();
              if (!middleware) {
                  return this._makeRequest(request, callback, response_middlewares);
              }
              if (middleware.cond(method, request)) {
                  var middleware_callback = function(retVal) {
                      /**
                       * got an error
                       * break middleware chain and callback
                       */
                      if (retVal && retVal instanceof Error) {
                          return callback(retVal, null);
                      }
                      /**
                       * got a response object
                       * break middleware chain and bypass request
                       */
                      if (retVal && typeof retVal == 'object') {
                          return that._callResponseMiddlewares(response_middlewares, retVal, callback);
                      }
                      /**
                       * got a callback
                       * push it on response_middlewares array
                       * will be called after request
                       */
                      if (retVal && typeof retVal == 'function') {
                          response_middlewares.unshift(retVal);
                      }
                      that._callRequestMiddlewares(middlewares, method, request, response_middlewares, callback);
                  };
                  middleware.fun(method, request, middleware_callback);
              } else {
                  this._callRequestMiddlewares(middlewares, method, request, response_middlewares, callback);
              }
          } catch (e) {
              callback(e, null);
          }
      }
docs: Call each middlewares with callback named 'next' for asynchronous processing.