From dbcbbd22769e6f66bd488b0d16658ccd6daf13a7 Mon Sep 17 00:00:00 2001 From: "ester.zhou" Date: Wed, 22 Jun 2022 20:46:22 +0800 Subject: [PATCH] update js-apis-request.md Signed-off-by: ester.zhou --- en/application-dev/reference/apis/js-apis-request.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/en/application-dev/reference/apis/js-apis-request.md b/en/application-dev/reference/apis/js-apis-request.md index d1c0ffc0d0..98ff862ea6 100644 --- a/en/application-dev/reference/apis/js-apis-request.md +++ b/en/application-dev/reference/apis/js-apis-request.md @@ -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) { -- GitLab