mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-23 01:08:28 +02:00
Update useSaveResponse.tsx
This commit is contained in:
@@ -20,7 +20,7 @@ export function useSaveResponse(response: HttpResponse) {
|
|||||||
|
|
||||||
const contentType = getContentTypeHeader(response.headers) ?? 'unknown';
|
const contentType = getContentTypeHeader(response.headers) ?? 'unknown';
|
||||||
const ext = mime.getExtension(contentType);
|
const ext = mime.getExtension(contentType);
|
||||||
const slug = slugify(request.name, { lower: true });
|
const slug = slugify(request.name ?? 'response', { lower: true });
|
||||||
const filepath = await save({
|
const filepath = await save({
|
||||||
defaultPath: ext ? `${slug}.${ext}` : slug,
|
defaultPath: ext ? `${slug}.${ext}` : slug,
|
||||||
title: 'Save Response',
|
title: 'Save Response',
|
||||||
|
|||||||
Reference in New Issue
Block a user