()
| 153 | } |
| 154 | |
| 155 | async text() { |
| 156 | if (this._text != null) return this._text; |
| 157 | const dec = new TextDecoder(); |
| 158 | let t = ''; |
| 159 | for await (const c of this.body) t += dec.decode(c, { stream: true }); |
| 160 | t += dec.decode(); |
| 161 | this._text = t; |
| 162 | return t; |
| 163 | } |
| 164 | |
| 165 | json() { |
| 166 | return this.text().then(JSON.parse); |
no outgoing calls
no test coverage detected