I have a software (Tally) running in my local machine. This software can run as a server (http://localhost, port number 9000). API call can be made using this URL to import and export data. Can I make a http request to this localserver from my application running in a remote webserver.
I tried to do it like this from the webserver:
var request = require('request');
var options = {
uri: 'http://192.168.0.3:9000',
method: 'GET'
};
request(options, function (error, response, body) {
if (error) {
console.log("Invalid Network Details");
} else {
if (response.statusCode == 200) {
console.log(body);
} else {
console.log("Unauthorized Access!!");
}
}
});
I am getting an output "Invalid network Details"