(
response: {
headers?: { get(name: string): string | null }
body?: ReadableStream<Uint8Array> | null
},
options: ReadResponseWithLimitOptions
)
| 298 | } |
| 299 | |
| 300 | export async function readResponseJsonWithLimit<T = unknown>( |
| 301 | response: { |
| 302 | headers?: { get(name: string): string | null } |
| 303 | body?: ReadableStream<Uint8Array> | null |
| 304 | }, |
| 305 | options: ReadResponseWithLimitOptions |
| 306 | ): Promise<T> { |
| 307 | return JSON.parse(await readResponseTextWithLimit(response, options)) as T |
| 308 | } |
| 309 | |
| 310 | export async function readFileToBufferWithLimit( |
| 311 | file: File, |
no test coverage detected