Better handling of large responses

This commit is contained in:
Gregory Schier
2024-07-23 08:59:15 -07:00
parent f24fd13c45
commit 13183ae837
5 changed files with 66 additions and 8 deletions

View File

@@ -20,7 +20,7 @@ export function useSaveResponse(response: HttpResponse) {
const contentType = getContentTypeHeader(response.headers) ?? 'unknown';
const ext = mime.getExtension(contentType);
const slug = slugify(request.name ?? 'response', { lower: true });
const slug = slugify(request.name || 'response', { lower: true });
const filepath = await save({
defaultPath: ext ? `${slug}.${ext}` : slug,
title: 'Save Response',