INNER CODE UNIT · JavaScript

url

nodejs/undici · index.js:99

      url = new URL(util.parseOrigin(url).origin + path)
    } else {
      if (!opts) {
        opts = typeof url === 'object' ? url : {}
      }

      url = util.parseURL(url)
    }

    const { agent, dispatcher = getGlobalDispatcher(), ...restOpts } = opts

    if (agent) {
      throw new InvalidArgumentError('unsupported opts.agent. Did you mean opts.client?')
    }

    return fn.call(dispatcher, {
      ...restOpts,
      origin: url.origin,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…