소스 검색

fix: 优化文件下载器方法

lighua 10 달 전
부모
커밋
df655015b1
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      packages/effects/request/src/request-client/modules/downloader.ts

+ 2 - 1
packages/effects/request/src/request-client/modules/downloader.ts

@@ -28,11 +28,12 @@ class FileDownloader {
   ): Promise<T> {
     const finalConfig: DownloadRequestConfig = {
       responseReturn: 'body',
+      method: 'GET',
       ...config,
       responseType: 'blob',
     };
 
-    const response = await this.client.get<T>(url, finalConfig);
+    const response = await this.client.request<T>(url, finalConfig);
 
     return response;
   }