mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-07-11 19:23:10 +00:00
Updated Examples (markdown)
parent
cf842ca8b5
commit
fbca5db82e
|
@ -23,7 +23,7 @@ HTTP.create()
|
||||||
if ("error" in res) {
|
if ("error" in res) {
|
||||||
console.error(res.error.message);
|
console.error(res.error.message);
|
||||||
} else if ("data" in res) {
|
} else if ("data" in res) {
|
||||||
console.log("ok");
|
console.log(res.name);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
;
|
;
|
||||||
|
@ -38,7 +38,11 @@ HTTP.create()
|
||||||
.setBearerAuth(token)
|
.setBearerAuth(token)
|
||||||
.setUseCache(false)
|
.setUseCache(false)
|
||||||
.get(apiUrl + "myproject/items/mycollection", function(res) {
|
.get(apiUrl + "myproject/items/mycollection", function(res) {
|
||||||
alert(res.name);
|
if ("error" in res) {
|
||||||
|
console.error(res.error.message);
|
||||||
|
} else if ("data" in res) {
|
||||||
|
console.log(res.name);
|
||||||
|
}
|
||||||
})
|
})
|
||||||
;
|
;
|
||||||
```
|
```
|
||||||
|
@ -61,6 +65,7 @@ var WMI = require("lib/wmi");
|
||||||
var ping = function(address) {
|
var ping = function(address) {
|
||||||
return WMI.execQuery("Select * From Win32_PingStatus where address='" + address + "'").fetch().get("ResponseTime");
|
return WMI.execQuery("Select * From Win32_PingStatus where address='" + address + "'").fetch().get("ResponseTime");
|
||||||
};
|
};
|
||||||
|
console.log(ping("1.1.1.1"));
|
||||||
```
|
```
|
||||||
|
|
||||||
## XML Parse
|
## XML Parse
|
||||||
|
|
Loading…
Reference in New Issue
Block a user