()
| 12127 | } |
| 12128 | // Returns a clone of response. |
| 12129 | clone() { |
| 12130 | webidl.brandCheck(this, _Response); |
| 12131 | if (bodyUnusable(this.#state)) { |
| 12132 | throw webidl.errors.exception({ |
| 12133 | header: "Response.clone", |
| 12134 | message: "Body has already been consumed." |
| 12135 | }); |
| 12136 | } |
| 12137 | const clonedResponse = cloneResponse(this.#state); |
| 12138 | if (this.#state.urlList.length !== 0 && this.#state.body?.stream) { |
| 12139 | streamRegistry.register(this, new WeakRef(this.#state.body.stream)); |
| 12140 | } |
| 12141 | return fromInnerResponse(clonedResponse, getHeadersGuard(this.#headers)); |
| 12142 | } |
| 12143 | [nodeUtil.inspect.custom](depth, options) { |
| 12144 | if (options.depth === null) { |
| 12145 | options.depth = 2; |
nothing calls this directly
no test coverage detected