constructor(basePath, options) {
    super()

    this.keyedInterceptors = {}
    this.interceptors = []
    this.transformPathFunction = null
    this.transformRequestBodyFunction = null
    this.matchHeaders = []
    this.scopeOptions = options || {}
    this.urlParts = {}
    this._persist = false
    this.contentLen = false
    this.date = null
    this.basePath = basePath
    this.basePathname = ''
    this.port = null
    this._defaultReplyHeaders = []

    let logNamespace = String(basePath)

    if (!(basePath instanceof RegExp)) {
      this.urlParts = normalizeUrl(basePath)
      this.port = this.urlParts.port
      this.basePathname = this.urlParts.pathname.replace(/\/$/, '')
      this.basePath = `${this.urlParts.protocol}//${this.urlParts.hostname}:${this.port}`
      logNamespace = this.urlParts.host
    }

    this.logger = scopeDebuglog(logNamespace)
  }
@param  {string|RegExp|LegacyUrl|URL} basePath
@param  {Object}   options
@param  {boolean}  options.allowUnmocked
@param  {string[]} options.badheaders
@param  {function} options.conditionally
@param  {boolean}  options.encodedQueryParams
@param  {function} options.filteringScope
@param  {Object}   options.reqheaders
@constructor