const http = require("http");
let saymonHostname = <...>
let path = "/node/api/incidents/" + incidentId + "/comment";
let auth = "Basic " + Buffer.from(login + ":" + password).toString("base64");
"hostname": saymonHostname,
"Content-Type": "text/plain"
let req = https.request(options, function (res) {
res.on("data", function (chunk) {
res.on("end", function (chunk) {
let body = Buffer.concat(chunks);
console.log(body.toString());
res.on("error", function (error) {
let data = "Hello from REST API!";