I'm trying to use Node's request module to make a request to https url. Code snippet below.
var request = require('request')
,r = request.defaults(
{'proxy':'https://localhost:8443',
strictSSL: false,
rejectUnauthorized: false,
});
function sendHttpsReq(){
r.get('https://my.https.url/api/model', function (error, response, body) {
if (!error && response.statusCode == 200) {
console.log(body);
}
});
}
Using the above code, If i use a http proxy and make a http request, the proxy server gets the request. But for a https url through a https proxy, the proxy server never gets the request. I'm using a simple node-http-proxy based proxy server running on my local server.