force response to text if not json

Without that I'm getting Version "[object Response]" on the smart card
from an api that returns text/plain.

See #847 - add Docuseal (requires text/plain support or hack)
main
Adam Monsen 2024-12-28 20:26:05 -08:00 committed by Bastien Wirtz
parent 2f1cbe7328
commit aba3b5eed7
1 changed files with 1 additions and 1 deletions

View File

@ -56,7 +56,7 @@ export default {
throw new Error(`Ping: target not available (${response.status} error)`); throw new Error(`Ping: target not available (${response.status} error)`);
} }
return json ? response.json() : response; return json ? response.json() : response.text();
}); });
}, },
}, },