(acRef)
| 13129 | throw new TypeError("Invalid statusText"); |
| 13130 | } |
| 13131 | } |
| 13132 | if ("status" in init && init.status != null) { |
| 13133 | response[kState].status = init.status; |
| 13134 | } |
| 13135 | if ("statusText" in init && init.statusText != null) { |
| 13136 | response[kState].statusText = init.statusText; |
| 13137 | } |
| 13138 | if ("headers" in init && init.headers != null) { |
| 13139 | fill(response[kHeaders], init.headers); |
| 13140 | } |
| 13141 | if (body) { |
| 13142 | if (nullBodyStatus.includes(response.status)) { |
| 13143 | throw webidl.errors.exception({ |
| 13144 | header: "Response constructor", |
| 13145 | message: `Invalid response status code ${response.status}` |
| 13146 | }); |
| 13147 | } |
| 13148 | response[kState].body = body.body; |
| 13149 | if (body.type != null && !response[kState].headersList.contains("content-type", true)) { |
| 13150 | response[kState].headersList.append("content-type", body.type, true); |
| 13151 | } |
| 13152 | } |
| 13153 | } |
| 13154 | function fromInnerResponse(innerResponse, guard) { |
| 13155 | var _a; |
| 13156 | const response = new Response(kConstruct); |
| 13157 | response[kState] = innerResponse; |
no outgoing calls
no test coverage detected