Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const https = require('https');
- var httpOptions = {
- hostname: <URL>,
- path: <PATH>,
- port:443,
- method:"GET",
- auth: <USERNAME>+":"+<PASSWORD>
- }
- console.log(httpOptions);
- https.get(httpOptions,(res)=>{
- console.log('statusCode:', res.statusCode);
- res.on('data', function (chunk) {
- console.log("DATA");
- });
- res.on('end',(error)=>{
- console.log("END");
- });
- res.on('error',(error)=>{
- console.log("ERRROR");
- });
- });
- Error: Hostname/IP doesn't match certificate's altnames: "Host: https. is not in the cert's altnames: DNS:*.ng.bluemix.net, DNS:ng.bluemix.net"
Add Comment
Please, Sign In to add comment