import { readFile, readTextFile } from '@tauri-apps/plugin-fs'; import type { HttpResponse } from '@yaakapp/api'; export async function getResponseBodyText(response: HttpResponse): Promise { if (response.bodyPath) { return await readTextFile(response.bodyPath); } return null; } export async function getResponseBodyBlob(response: HttpResponse): Promise { if (response.bodyPath) { return readFile(response.bodyPath); } return null; }