How to request HTTPS using http.request #5116
Replies: 1 comment
-
Posted at 2017-05-12 by dave_irvine Got it, you need to specify an undocumented parameter in options called
Posted at 2017-05-12 by @gfwilliams Thanks - I've just updated the docs, so it'll be on the main site next time I update Posted at 2024-07-15 by LukVolvo I want to make a PUT HTTPS request with the Espruino WiFi module. How can I do this? Require("https") is not recognised. Can someone give me an example code? Posted at 2024-07-16 by Christine Hi! You can try something like this:
Posted at 2024-07-16 by LukVolvo Hello, I succeeded in making an HTTPS request but after a few attempts, I get the messag below. Anyone who can help me with this? Attachments: Posted at 2024-07-22 by @gfwilliams Sorry to hear that - that could be a sign that you're running low on memory as HTTPS can take a lot. Do you think it's possible that maybe you're not closing the HTTPS connection, so it's staying open? So then multiple HTTPS connections open at the same time would chew through your RAM. You could check |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2017-05-12 by dave_irvine
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.Beta Was this translation helpful? Give feedback.
All reactions