From 0367f8a1cc2320b0caada393af522563f7641a77 Mon Sep 17 00:00:00 2001 From: "Namhyeon, Go" Date: Sun, 15 Nov 2020 05:59:39 +0900 Subject: [PATCH] Updated Examples (markdown) --- Examples.md | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/Examples.md b/Examples.md index 1468466..772796b 100644 --- a/Examples.md +++ b/Examples.md @@ -2,6 +2,8 @@ ## HTTP Request +### POST request with headers + ```javascript var HTTP = require("lib/http"); @@ -23,6 +25,7 @@ HTTP.create() ; ``` +### GET request with headers ```javascript var HTTP = require("lib/http"); @@ -34,4 +37,22 @@ HTTP.create() alert(res.name); }) ; -``` \ No newline at end of file +``` + +## WMI Query + +### Get list of processes +```javascript +var WMI = require("lib/wmi"); +var getProcesses = function() { + return WMI.execQuery("Select * From Win32_Process").fetchAll(); +}; +``` + +### Network ping test +```javascript +var WMI = require("lib/wmi"); +var ping = function(address) { + return WMI.execQuery("Select * From Win32_PingStatus where address='" + address + "'").fetch().get("ResponseTime"); +}; +```