未验证 提交 24234f02 编写于 作者: O openharmony_ci 提交者: Gitee

!5730 翻译完成 5661:【misc软件服务子系统】适配request部件

Merge pull request !5730 from ester.zhou/TR-5661
......@@ -85,7 +85,7 @@ Uploads files. This API uses a promise to return the result.
```js
let file1 = { filename: "test", name: "test", uri: "internal://cache/test.jpg", type: "jpg" };
let data = { name: "name123", value: "123" };
let header = { key1: value1, key2: value2 };
let header = { key1: "value1", key2: "value2" };
let uploadTask;
request.upload({ url: 'https://patch', header: header, method: "POST", files: [file1], data: [data] }).then((data) => {
uploadTask = data;
......@@ -117,7 +117,7 @@ Uploads files. This API uses an asynchronous callback to return the result.
```js
let file1 = { filename: "test", name: "test", uri: "internal://cache/test.jpg", type: "jpg" };
let data = { name: "name123", value: "123" };
let header = { key1: value1, key2: value2 };
let header = { key1: "value1", key2: "value2" };
let uploadTask;
request.upload({ url: 'https://patch', header: header, method: "POST", files: [file1], data: [data] }, (err, data) => {
if (err) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册