Oh, I see, after finding the information accidentally: Hardly any boards can use HTTPS requests. I wish this fact had been written onto the http.request documentation. Now the information can only be found here: https://www.espruino.com/Internet#https and nowhere else.
Well, I experienced a moment of re-evaluation at this point. In private (unsecure) projects, I think http may work, though.
Anyhow, after such a good start I had, this was somewhat disappointing.
The ESP8266 is so limited that it's definitly not possible. ESP32 can do after deactivate of BLE or if you use a board with PSRAM
Well, for this project, the lack of SSL is not the killer. I can definitely do a lot at the remote server end (like limiting the access to an IP range), or possibly add an Nginx/PHP server as a mediator :)
Espruino is somewhat weird, but fun to work with, especially when writing the JS app in TypeScript. It is much move convenient than MicroPython, for instance. I like the event-driven approach.
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 :)