In the docs I can see there is provision for HTTPS when using http.get, you just pass a https:// url and it works it out. But what about when using http.request?
Works fine, but if I change the port to 443 it just stalls. I assume because its trying to talk HTTP to a HTTPS port. I don't really want to use tls.connect because that gives me a socket rather than a https connection.
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 the docs I can see there is provision for HTTPS when using
http.get
, you just pass ahttps://
url and it works it out. But what about when usinghttp.request
?Works fine, but if I change the port to 443 it just stalls. I assume because its trying to talk HTTP to a HTTPS port. I don't really want to use
tls.connect
because that gives me a socket rather than a https connection.