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

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

Merge pull request !16567 from liyufan/master
......@@ -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\<void>;
```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))
})
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册