pull/23081/merge
Artem Zinenko 8 years ago committed by Matt Davis
parent 097173c6f5
commit a5da638d34

@ -81,6 +81,14 @@ Else {
Try { Try {
$webRequest = [System.Net.HttpWebRequest]::Create($url) $webRequest = [System.Net.HttpWebRequest]::Create($url)
if ($proxy_url) {
$proxy_server = New-Object System.Net.WebProxy($proxy_url, $true)
if ($proxy_username -and $proxy_password) {
$proxy_credential = New-Object System.Net.NetworkCredential($proxy_username, $proxy_password)
$proxy_server.Credentials = $proxy_credential
}
$webRequest.Proxy = $proxy_server
}
if($username -and $password){ if($username -and $password){
$webRequest.Credentials = New-Object System.Net.NetworkCredential($username, $password) $webRequest.Credentials = New-Object System.Net.NetworkCredential($username, $password)

Loading…
Cancel
Save