chocolatey-archive/chocolatey

Get-WebFile returns a 401 error

svantreeck opened this issue · 2 comments

Behind our corporate network, we have an issue where requests need to have the UseDefaultCredentials property set to true. As a result, I've modified Get-WebFile.ps1 to set the property before making a request. I have no idea if setting this to true automatically would cause problems for others not behind a firewall like ours, but if it would be configurable, it could help out tremendously.

$req = [System.Net.HttpWebRequest]::Create($url);
$req.UseDefaultCredentials = true

Duplicate of #577

By the way, already fixed and already out in 0.9.8.28+