Started multi-part response viewer

This commit is contained in:
Gregory Schier
2025-12-06 06:47:09 -08:00
parent 7b78fac24e
commit 113d0dc3c7
8 changed files with 101 additions and 21 deletions

View File

@@ -1,3 +1,4 @@
import { readFile } from '@tauri-apps/plugin-fs';
import type { HttpResponse } from '@yaakapp-internal/models';
import type { FilterResponse } from '@yaakapp-internal/plugins';
import type { ServerSentEvent } from '@yaakapp-internal/sse';
@@ -30,3 +31,10 @@ export async function getResponseBodyEventSource(
filePath: response.bodyPath,
});
}
export async function getResponseBodyBytes(
response: HttpResponse,
): Promise<Uint8Array<ArrayBuffer> | null> {
if (!response.bodyPath) return null;
return readFile(response.bodyPath);
}