|
@@ -82,12 +82,8 @@ export default function request(url, options) {
|
|
|
if ( newOptions.DOWNLOAD ) {
|
|
|
console.log('download request');
|
|
|
delete newOptions.DOWNLOAD;
|
|
|
- newOptions.headers = {
|
|
|
- Accept: 'application/binary',
|
|
|
- 'Content-Type': 'multipart/x-www-form-urlencoded',
|
|
|
- ...newOptions.headers,
|
|
|
- };
|
|
|
}
|
|
|
+
|
|
|
console.log('>>>>>>>>>newOptions',newOptions)
|
|
|
return fetch(url, newOptions)
|
|
|
.then(checkHttpStatus)
|
|
@@ -95,7 +91,9 @@ export default function request(url, options) {
|
|
|
if (response.status === 204) {
|
|
|
return response.text();
|
|
|
}
|
|
|
+ console.log('fetch 中获取的response',response)
|
|
|
return response.json();
|
|
|
+
|
|
|
})
|
|
|
.then(checkContentStatus)
|
|
|
.catch((e) => {
|