mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-17 23:14:03 +01:00
Fix text encoding and delete responses
This commit is contained in:
@@ -8,7 +8,8 @@ export function useResponseBodyText(response: HttpResponse) {
|
||||
initialData: null,
|
||||
queryFn: async () => {
|
||||
if (response.body) {
|
||||
return String.fromCharCode.apply(null, response.body);
|
||||
const uint8Array = Uint8Array.of(...response.body);
|
||||
return new TextDecoder().decode(uint8Array);
|
||||
}
|
||||
|
||||
if (response.bodyPath) {
|
||||
|
||||
Reference in New Issue
Block a user