(self, signal)
| 10209 | if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") { |
| 10210 | throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget"); |
| 10211 | } |
| 10212 | if (method === "CONNECT") { |
| 10213 | throw new InvalidArgumentError("invalid method"); |
| 10214 | } |
| 10215 | if (onInfo && typeof onInfo !== "function") { |
| 10216 | throw new InvalidArgumentError("invalid onInfo callback"); |
| 10217 | } |
| 10218 | super("UNDICI_REQUEST"); |
| 10219 | } catch (err) { |
| 10220 | if (util.isStream(body)) { |
| 10221 | util.destroy(body.on("error", util.nop), err); |
| 10222 | } |
| 10223 | throw err; |
| 10224 | } |
| 10225 | this.method = method; |
| 10226 | this.responseHeaders = responseHeaders || null; |
| 10227 | this.opaque = opaque || null; |
| 10228 | this.callback = callback; |
| 10229 | this.res = null; |
| 10230 | this.abort = null; |
no test coverage detected