mirror of
https://github.com/bastienwirtz/homer.git
synced 2025-08-17 03:51:15 +02:00
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)
This commit is contained in:
committed by
Bastien Wirtz
parent
2f1cbe7328
commit
aba3b5eed7
@ -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();
|
||||
});
|
||||
},
|
||||
},
|
||||
|
Reference in New Issue
Block a user