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 2e6e392ff2de19431e85af08a1f23dfe88f21e66..40492367bd96e8ebdb15bac7a4ba24d07346d0b1 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)) })