This commit is contained in:
2020-09-02 22:49:28 +00:00
parent bfaca6b85d
commit 9128b425c7
2 changed files with 47 additions and 1 deletions

View File

@@ -190,6 +190,7 @@ export default {
return response;
}
let contentType = response.headers.get("content-type");
if (!contentType) {
return response;
}
@@ -199,6 +200,10 @@ export default {
if (contentType.includes("text/plain")) {
return await response.text();
}
if (contentType.includes("application/pdf")) {
return await response.blob();
}
return response;
},
extractBody(response) {