(self)
| 10226 | if (body) { |
| 10227 | this.body = null; |
| 10228 | util.destroy(body, err); |
| 10229 | } |
| 10230 | if (this.removeAbortListener) { |
| 10231 | res == null ? void 0 : res.off("close", this.removeAbortListener); |
| 10232 | this.removeAbortListener(); |
| 10233 | this.removeAbortListener = null; |
| 10234 | } |
| 10235 | } |
| 10236 | }; |
| 10237 | function request(opts, callback) { |
| 10238 | if (callback === void 0) { |
| 10239 | return new Promise((resolve2, reject) => { |
| 10240 | request.call(this, opts, (err, data) => { |
| 10241 | return err ? reject(err) : resolve2(data); |
| 10242 | }); |
no test coverage detected