Hi!
You can try something like this:
// Load the WiFi and HTTP modules var wifi = require("Wifi"); var https = require("http"); // Your WiFi credentials var SSID = "your-SSID"; var PASSWORD = "your-password"; // Connect to WiFi wifi.connect(SSID, { password: PASSWORD }, function(err) { if (err) { console.log("WiFi connection error: ", err); return; } console.log("Connected to WiFi"); // Options for the HTTPS request var options = { host: "your-server.com", port: 443, path: "/your-endpoint", method: "PUT", headers: { "Content-Type": "application/json", "Content-Length": JSON.stringify({ data: "your-data" }).length } };
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?
@Christine started
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.
Hi!
You can try something like this: