From 7aac872f0fb1b2f635f8ceb4012016d62c289fdc Mon Sep 17 00:00:00 2001 From: liyufan Date: Mon, 27 Mar 2023 18:54:04 +0800 Subject: [PATCH] fix err example Signed-off-by: liyufan --- .../reference/apis/js-apis-net-connection.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/zh-cn/application-dev/reference/apis/js-apis-net-connection.md b/zh-cn/application-dev/reference/apis/js-apis-net-connection.md index 2e6e392ff2..40492367bd 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-net-connection.md +++ b/zh-cn/application-dev/reference/apis/js-apis-net-connection.md @@ -294,8 +294,8 @@ let httpProxy = { port: 8080, exclusionList: exclusionArray } -connection.setGlobalHttpProxy(httpProxy).then((error, data) => { - console.info(JSON.stringify(data)); +connection.setGlobalHttpProxy(httpProxy).then(() => { + console.info("success"); }).catch(error=>{ console.info(JSON.stringify(error)); }) @@ -436,8 +436,8 @@ setAppNet(netHandle: NetHandle): Promise\; ```js connection.getDefaultNet().then(function (netHandle) { - connection.setAppNet(netHandle).then((error, data) => { - console.log(JSON.stringify(data)) + connection.setAppNet(netHandle).then(() => { + console.log("success") }).catch(error => { console.log(JSON.stringify(error)) }) -- GitLab