mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-18 23:44:12 +01:00
Detect JSON APIs returning HTML content-type
This commit is contained in:
@@ -4,7 +4,7 @@ import { getResponseBodyText } from '../lib/responseBody';
|
||||
|
||||
export function useResponseBodyText(response: HttpResponse) {
|
||||
return useQuery<string | null>({
|
||||
queryKey: ['response-body-text', response?.updatedAt],
|
||||
queryKey: ['response-body-text', response.id, response?.updatedAt],
|
||||
queryFn: () => getResponseBodyText(response),
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user