lib/Request.js
function (options, params) {
    var self = this;

    return this.onBeforeHandle()
      .then(function () {

        // 请求 Promise
        return new Promise(function (resolve, reject) {
          var client = this.protocol === 'http' ? require('http') : require('https');
          var req = client.request(options, self.genResponseFn(resolve, reject));

          req.on('error', reject);

          // 发送参数
          if (params) {
            var stringify = genStringify(options);
            req.write(stringify(params));
          }

          req.end();
        });
      });
  }
function (options, params) {
    var self = this;

    return this.onBeforeHandle()
      .then(function () {

        // 请求 Promise
        return new Promise(function (resolve, reject) {
          var client = this.protocol === 'http' ? require('http') : require('https');
          var req = client.request(options, self.genResponseFn(resolve, reject));

          req.on('error', reject);

          // 发送参数
          if (params) {
            var stringify = genStringify(options);
            req.write(stringify(params));
          }

          req.end();
        });
      });
  }
请求操作
@param options
@param params