(stream, type)
| 9796 | }); |
| 9797 | } |
| 9798 | // https://fetch.spec.whatwg.org/#dom-body-formdata |
| 9799 | formData() { |
| 9800 | return __async(this, null, function* () { |
| 9801 | throw new NotSupportedError(); |
| 9802 | }); |
| 9803 | } |
| 9804 | // https://fetch.spec.whatwg.org/#dom-body-bodyused |
| 9805 | get bodyUsed() { |
| 9806 | return util.isDisturbed(this); |
| 9807 | } |
| 9808 | // https://fetch.spec.whatwg.org/#dom-body-body |
| 9809 | get body() { |
| 9810 | if (!this[kBody]) { |
| 9811 | this[kBody] = ReadableStreamFrom(this); |
| 9812 | if (this[kConsume]) { |
| 9813 | this[kBody].getReader(); |
| 9814 | assert(this[kBody].locked); |
| 9815 | } |
| 9816 | } |
| 9817 | return this[kBody]; |
| 9818 | } |
| 9819 | dump(opts) { |
| 9820 | return __async(this, null, function* () { |
| 9821 | let limit = Number.isFinite(opts == null ? void 0 : opts.limit) ? opts.limit : 128 * 1024; |
| 9822 | const signal = opts == null ? void 0 : opts.signal; |
| 9823 | if (signal != null && (typeof signal !== "object" || !("aborted" in signal))) { |
| 9824 | throw new InvalidArgumentError("signal must be an AbortSignal"); |
| 9825 | } |
| 9826 | signal == null ? void 0 : signal.throwIfAborted(); |
| 9827 | if (this._readableState.closeEmitted) { |
| 9828 | return null; |
| 9829 | } |
| 9830 | return yield new Promise((resolve2, reject) => { |
| 9831 | if (this[kContentLength] > limit) { |
| 9832 | this.destroy(new AbortError()); |
| 9833 | } |
| 9834 | const onAbort = () => { |
| 9835 | var _a; |
| 9836 | this.destroy((_a = signal.reason) != null ? _a : new AbortError()); |
| 9837 | }; |
| 9838 | signal == null ? void 0 : signal.addEventListener("abort", onAbort); |
| 9839 | this.on("close", function() { |
no test coverage detected