提交 4f160daf 编写于 作者: L liyufan

fix err example

Signed-off-by: Nliyufan <liyufan5@huawei.com>
上级 6833ac50
......@@ -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.
先完成此消息的编辑!
想要评论请 注册