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

!16567 修复连接管理错误示例

Merge pull request !16567 from liyufan/master
...@@ -294,8 +294,8 @@ let httpProxy = { ...@@ -294,8 +294,8 @@ let httpProxy = {
port: 8080, port: 8080,
exclusionList: exclusionArray exclusionList: exclusionArray
} }
connection.setGlobalHttpProxy(httpProxy).then((error, data) => { connection.setGlobalHttpProxy(httpProxy).then(() => {
console.info(JSON.stringify(data)); console.info("success");
}).catch(error=>{ }).catch(error=>{
console.info(JSON.stringify(error)); console.info(JSON.stringify(error));
}) })
...@@ -436,8 +436,8 @@ setAppNet(netHandle: NetHandle): Promise\<void>; ...@@ -436,8 +436,8 @@ setAppNet(netHandle: NetHandle): Promise\<void>;
```js ```js
connection.getDefaultNet().then(function (netHandle) { connection.getDefaultNet().then(function (netHandle) {
connection.setAppNet(netHandle).then((error, data) => { connection.setAppNet(netHandle).then(() => {
console.log(JSON.stringify(data)) console.log("success")
}).catch(error => { }).catch(error => {
console.log(JSON.stringify(error)) console.log(JSON.stringify(error))
}) })
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册