From fb8c9c70b635d5baaf1d2f6666b6def84ae31005 Mon Sep 17 00:00:00 2001 From: anyueling Date: Thu, 19 Jan 2023 18:59:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9request=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E6=8F=8F=E8=BF=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: anyueling --- .../reference/apis/js-apis-request.md | 2 +- .../reference/apis/js-apis-system-request.md | 22 +++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/zh-cn/application-dev/reference/apis/js-apis-request.md b/zh-cn/application-dev/reference/apis/js-apis-request.md index 8548dc142e..73c89e70b2 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-request.md +++ b/zh-cn/application-dev/reference/apis/js-apis-request.md @@ -755,7 +755,7 @@ remove(callback: AsyncCallback<boolean>): void | -------- | -------- | -------- | -------- | | filename | string | 是 | multipart提交时,请求头中的文件名。 | | name | string | 是 | multipart提交时,表单项目的名称,缺省为file。 | -| uri | string | 是 | 文件的本地存储路径。
支持“dataability”和“internal”两种协议类型,但“internal”仅支持临时目录,示例:
dataability:///com.domainname.dataability.persondata/person/10/file.txt
internal://cache/path/to/file.txt | +| uri | string | 是 | 文件的本地存储路径。
仅支持“internal”协议类型,“internal://cache/”为必填字段,示例:
internal://cache/path/to/file.txt | | type | string | 是 | 文件的内容类型,默认根据文件名或路径的后缀获取。 | diff --git a/zh-cn/application-dev/reference/apis/js-apis-system-request.md b/zh-cn/application-dev/reference/apis/js-apis-system-request.md index f1e799e9ca..47c4dfecda 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-system-request.md +++ b/zh-cn/application-dev/reference/apis/js-apis-system-request.md @@ -89,11 +89,11 @@ upload(options: UploadRequestOptions): void **系统能力**: 以下各项对应的系统能力均为SystemCapability.MiscServices.Upload。 - | 名称 | 类型 | 说明 | - | -------- | -------- | -------- | - | code | number | 服务器返回的HTTP状态码。 | - | data | string | 服务器返回的内容。根据返回头内容中的type决定该值的类型。 | - | headers | Object | 服务器返回的返回头内容。 | + | 名称 | 类型 | 必填 | 说明 | + | -------- | -------- | -------- | -------- | + | code | number | 是 | 服务器返回的HTTP状态码。 | + | data | string | 是 | 服务器返回的内容。根据返回头内容中的type决定该值的类型。 | + | headers | Object | 是 | 服务器返回的返回头内容。 | ## RequestFile @@ -189,9 +189,9 @@ download(options: DownloadRequestOptions): void **系统能力**: 以下各项对应的系统能力均为SystemCapability.MiscServices.Download。 - | 名称 | 类型 | 说明 | - | -------- | -------- | -------- | - | token | string | 表示下载的token,获取下载状态的依据。 | + | 名称 | 类型 | 必填 | 说明 | + | -------- | -------- | -------- | -------- | + | token | string | 是 | 表示下载的token,获取下载状态的依据。 | ## request.onDownloadComplete @@ -254,6 +254,6 @@ onDownloadComplete(options: OnDownloadCompleteOptions): void **系统能力**: 以下各项对应的系统能力均为SystemCapability.MiscServices.Download。 - | 名称 | 类型 | 说明 | - | -------- | -------- | -------- | - | uri | string | 表示下载文件的uri。 | \ No newline at end of file + | 名称 | 类型 | 必填 | 说明 | + | -------- | -------- | -------- | -------- | + | uri | string | 是 | 表示下载文件的uri。 | \ No newline at end of file -- GitLab