Is there any way to use an IP address instead of a domain name in node.js Request module?
I am getting the following error: [Error: Invalid URI "192.168.0.101/relay1/on"]
I know I shouldn't include the url scheme (e.g: http), so http:// 192.168.0.101/relay1/on wouldn't work either.
Below is the code generating the error:
var arduinoRequestURL = arduinoIp + '/' + modulePrivateName + '/' + req.params.action;
request(arduinoRequestURL, function (error, response, body) {
console.log(body);
console.log(error);
console.log(response);
});
And here is a link to the module: https://github.com/mikeal/request