Skip to content

Commit

Permalink
docs: update
Browse files Browse the repository at this point in the history
  • Loading branch information
mynetfan committed Jan 21, 2025
1 parent 44d008e commit c001d54
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { RequestClient } from '../request-client';
import type { RequestClientConfig, RequestResponse } from '../types';
import type { RequestClientConfig } from '../types';

type DownloadRequestConfig = {
/**
Expand All @@ -20,9 +20,9 @@ class FileDownloader {
* 下载文件
* @param url 文件的完整链接
* @param config 配置信息,可选。
* @returns 如果config.responseReturn为'body',则返回Blob(默认),否则返回AxiosResponse<Blob>
* @returns 如果config.responseReturn为'body',则返回Blob(默认),否则返回RequestResponse<Blob>
*/
public async download<T = RequestResponse<Blob>>(
public async download<T = Blob>(
url: string,
config?: DownloadRequestConfig,
): Promise<T> {
Expand Down
2 changes: 1 addition & 1 deletion packages/effects/request/src/request-client/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import type {
type ExtendOptions = {
/** 响应数据的返回方式。
* raw: 原始的AxiosResponse,包括headers、status等,不做是否成功请求的检查。
* body: 返回响应数据的BODY部分(只会根据status检查请求是否成功,忽略对code的判断)。
* body: 返回响应数据的BODY部分(只会根据status检查请求是否成功,忽略对code的判断,这种情况下应由调用方检查请求是否成功)。
* data: 解构响应的BODY数据,只返回其中的data节点数据(会检查status和code是否为成功状态)。
*/
responseReturn?: 'body' | 'data' | 'raw';
Expand Down

0 comments on commit c001d54

Please sign in to comment.