diff --git a/Examples.md b/HTTP-Request.md similarity index 57% rename from Examples.md rename to HTTP-Request.md index a7e2962..d5a6a4a 100644 --- a/Examples.md +++ b/HTTP-Request.md @@ -1,9 +1,3 @@ -# Examples of WelsonJS - -* HTTP Request -* WMI Query -* XML Parse - ## HTTP Request ### POST request with headers @@ -45,38 +39,4 @@ HTTP.create() } }) ; -``` - -## WMI Query - -### Get list of processes -```javascript -var WMI = require("lib/wmi"); - -var getProcesses = function() { - return WMI.execQuery("Select * From Win32_Process").fetchAll(); -}; -``` - -### Test network ping -```javascript -var WMI = require("lib/wmi"); - -var ping = function(address) { - return WMI.execQuery("Select * From Win32_PingStatus where address='" + address + "'").fetch().get("ResponseTime"); -}; -console.log(ping("1.1.1.1")); -``` - -## XML Parse - -### Get value - -```javascript -var XML = require("lib/xml"); - -var getAppName = function() { - return XML.load("config.xml").select("/Config/AppName").first().getText(); -} -console.log(getAppName()); ``` \ No newline at end of file