From aba3b5eed763ef448793a3bc6e88f9b040c70a9d Mon Sep 17 00:00:00 2001 From: Adam Monsen Date: Sat, 28 Dec 2024 20:26:05 -0800 Subject: [PATCH] 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) --- src/mixins/service.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mixins/service.js b/src/mixins/service.js index b4fd2ad4..7051a8fb 100644 --- a/src/mixins/service.js +++ b/src/mixins/service.js @@ -56,7 +56,7 @@ export default { throw new Error(`Ping: target not available (${response.status} error)`); } - return json ? response.json() : response; + return json ? response.json() : response.text(); }); }, },