I am trying to send a request to HTTPS url in my case it is the updateDataUrl which is the https url but i want to skip the ssl certificate for now when sending request since we are waiting for the domain to be purchased.How can I send the https request by passing the ssl certificate to this url .Below is the code that I have tried seeing some solutions on stackoverflow but it does not work for me.
var XMLHttpRequest = require("xmlhttprequest").XMLHttpRequest;
var https = require('https');
var app = express();
const { constants } = require('crypto')
app.post('/updateData, function (req, res) {
var xhr = new XMLHttpRequest();
xhr.open("POST", updateDataUrl, false);
xhr.onload = function () {
var response = xhr.responseText;
res.send(“Data Updated\n”);
};
xhr.onerror = function () {
res.send(null);
};
xhr.send(updateData);
});
https.createServer({
secureOptions: constants.SSL_OP_NO_TLSv1 | constants.SSL_OP_NO_TLSv1_1
}, app).listen(443)