code: function _createReq(resolve) {
      let startTime = new Date();
      return Request(opt, (err, httpResponse, data) => {
  
        let status = httpResponse && httpResponse.statusCode || 'NULL',
          duration = (new Date() - startTime) + 'ms',
          info = { status: status, duration: duration };
  
        // 请求出错
        if (err) {
          err.status = status;
          err.duration = duration;
          error('proxy error : ' + opt.uri, err);
  
          resolve(callback(httpResponse, data || err));
          return;
        }
  
        // 有正常的返回数据 或 method为HEAD
        // 因为method的head的请求只会返回请求头不会返回请求体
        if (data || ctx.method === 'HEAD') {
          debug('proxy success : ' + opt.uri, info);
  
          resolve(callback(httpResponse, data));
          return;
        }
  
        // 没有报错，但是也没有正常返回的数据
        // 根据重试配置进行重试,
        if (retryNum > 0) {
          debug(`proxy retry: Request ${opt.uri} no response, retry ${retryNum} times!`, info);
          retryNum--;
          return _createReq(resolve)
        } else {
          error(`proxy error: Request ${opt.uri} no response!`, info);
  
          resolve(callback(httpResponse, {
            code: 'NULL',
            message: 'No response data!'
          }));
        }
      });
    }
docs: 创建请求
  @return {Object} 请求对象