//npm install node-rest-client --save-dev
var Client = require('node-rest-client').Client
function locate() {
var client = new Client()
var args = {
data: { input: "hello" },
headers: { "Content-Type": "application/json" }
};
// registering remote methods
client.registerMethod("postMethod", "http://192.168.1.122:8082/api/geo/domain", "POST");
client.methods.postMethod(args, function (data, response) {
// parsed response body as js object
console.log(data);
// raw response
console.log(response);
});
}