* Gets the parsed response data and the raw `Response` instance. * * If you just want to get the raw `Response` instance without parsing it, * you can use asResponse().
()
| 564 | * you can use {@link asResponse()}. |
| 565 | */ |
| 566 | async withResponse(): Promise<{ data: T; response: Response }> { |
| 567 | const [data, response] = await Promise.all([this.parse(), this.asResponse()]); |
| 568 | return { data, response }; |
| 569 | } |
| 570 | |
| 571 | private parse(): Promise<T> { |
| 572 | return this.responsePromise.then((result) => result.data); |
no test coverage detected