var req =require("http").request(options,function(res){
res.on('data',function(data){
console.log(res);
console.log("HTTP> "+data);
});
res.on('close',function(data){
console.log(res);
console.log("Connection closed");
});
});
However, I keep getting a code 400 reply "The plain HTTP request was sent to HTTPS port". There are no redirects at the server end and I have tested the same functionality with my own server, address http://www.xdb.fi/dummy.txt - with the same result.
The script seems to be using http, despite all my attempts to switch to https. Do I have two blind eyes? I have one semi-blind already :)
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
In my test script I have these options
and this code after the definition.
However, I keep getting a code 400 reply "The plain HTTP request was sent to HTTPS port". There are no redirects at the server end and I have tested the same functionality with my own server, address http://www.xdb.fi/dummy.txt - with the same result.
The script seems to be using http, despite all my attempts to switch to https. Do I have two blind eyes? I have one semi-blind already :)
Markku