We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f0f3b0b commit e20011dCopy full SHA for e20011d
src/http.js
@@ -64,12 +64,7 @@ export default function http(url, request = {}) {
64
})
65
}
66
67
-function shouldDownloadAsText(contentType) {
68
- return /json/.test(contentType) ||
69
- /xml/.test(contentType) ||
70
- /yaml/.test(contentType) ||
71
- /text/.test(contentType)
72
-}
+const shouldDownloadAsText = (contentType = "") => /json|xml|yaml|text/.test(contentType)
73
74
// Serialize the response, returns a promise with headers and the body part of the hash
75
export function serializeRes(oriRes, url, {loadSpec = false} = {}) {
0 commit comments