(input)
| 19382 | url = util.parseURL(url); |
| 19383 | } |
| 19384 | const { agent, dispatcher = getGlobalDispatcher() } = opts; |
| 19385 | if (agent) { |
| 19386 | throw new InvalidArgumentError("unsupported opts.agent. Did you mean opts.client?"); |
| 19387 | } |
| 19388 | return fn.call(dispatcher, __spreadProps(__spreadValues({}, opts), { |
| 19389 | origin: url.origin, |
| 19390 | path: url.search ? `${url.pathname}${url.search}` : url.pathname, |
| 19391 | method: opts.method || (opts.body ? "PUT" : "GET") |
| 19392 | }), handler); |
| 19393 | }; |
| 19394 | } |
no test coverage detected