docs: function req(method, url, opts, cb) {
    opts.handlers = opts.handlers || {};
    opts.retry = opts.retry || false;
  
    const TIMEOUT = 30000;
    // init default settings with follow redirections on all methods, and 30 seconds timeout
    var params = {
        url: url,
        followAllRedirects: true,
        rejectUnauthorized: false,
        timeout: opts.timeout || TIMEOUT
      },
      envProxy = proxy(url);
  
    // set proxy setting based on environment variable
    if (!_proxyIgnored(url, opts)) {
      if (opts.proxy) {
        params.proxy = opts.proxy;
      } else if (envProxy) {
        params.proxy = envProxy;
      }
    }
  
    // just a more readable opt name for query strings
    if (opts.queryStrings) {
      params.qs = opts.queryStrings;
    }
  
    // headers and payload handling
    ['headers', 'body', 'form', 'json', 'multipart','agentOptions'].forEach(function (opt) {
      if (opts[opt]) {
        params[opt] = opts[opt];
      }
    });
  
    // override defaults with mikeal/request-specific opts
    if (opts.requestOpts) {
      Object.keys(opts.requestOpts).forEach(function (opt) {
        params[opt] = opts.requestOpts[opt];
      });
    }
  
    function _requestMethod(method) {
      var requestMethod = method.toLowerCase();
      if (requestMethod === 'delete') {
        requestMethod = 'del';
      }
      return requestMethod;
    }
  
    _execRequest(opts, _requestMethod(method), params, function (err, result) {
      if (err) {
        if (opts.handlers.error) {
          opts.handlers.error(err, result, cb);
        } else {
          cb(err);
        }
      } else {
        var wildcardMatch = _wildcardMatch(result.statusCode, Object.keys(opts.handlers));
        if (opts.handlers[result.statusCode]) {
          opts.handlers[result.statusCode](result, cb);
        } else if (wildcardMatch) {
          opts.handlers[wildcardMatch](result, cb);
        } else {
          cb(new Error('Unexpected status code: ' + result.statusCode + '\nResponse body:\n' + result.body));
        }
      }
    });
  }