mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-18 23:43:55 +01:00
Fix text decoding when no content-type
Closes https://feedback.yaak.app/p/not-rendering-response
This commit is contained in:
@@ -3,7 +3,7 @@ import type { HttpResponse } from '@yaakapp-internal/models';
|
||||
import { getResponseBodyText } from '../lib/responseBody';
|
||||
|
||||
export function useResponseBodyText(response: HttpResponse) {
|
||||
return useQuery<string | null>({
|
||||
return useQuery({
|
||||
placeholderData: (prev) => prev, // Keep previous data on refetch
|
||||
queryKey: ['response-body-text', response.id, response.updatedAt, response.contentLength],
|
||||
queryFn: () => getResponseBodyText(response),
|
||||
|
||||
Reference in New Issue
Block a user