I am trying to send a get request to a site over https using request. I am however, behind a proxy, which requires authentication to use. When i try to add the authentication however it fails to connect to the site.
I have tried adding the authentication in the proxy url like:
var proxyUrl = "http://" + 'user' + ":" + 'password' + "@" + 'url:8080';
var request = require('request').defaults({proxy: proxyUrl});
I also tried to add the authorization to the header however this had also the same problem
headers: {
'Proxy-Authorization': new Buffer('user:password').toString('base64')
}
It seems the proxy is coming back with the auth response however request dosent seem to send anything after that so it does not actually login. Is there some more config i need to add?