win_get_url doc/strict-mode fixes
plus cleaning up from bad merge
This commit is contained in:
parent
c9fe542e8c
commit
11f4340a44
2 changed files with 5 additions and 11 deletions
|
@ -44,9 +44,9 @@ $skip_certificate_validation = Get-Attr $params "skip_certificate_validation" $f
|
||||||
$username = Get-Attr $params "username"
|
$username = Get-Attr $params "username"
|
||||||
$password = Get-Attr $params "password"
|
$password = Get-Attr $params "password"
|
||||||
|
|
||||||
$proxy_url = $params.proxy_url
|
$proxy_url = Get-Attr $params "proxy_url"
|
||||||
$proxy_username = $params.proxy_username
|
$proxy_username = Get-Attr $params "proxy_username"
|
||||||
$proxy_password = $params.proxy_password
|
$proxy_password = Get-Attr $params "proxy_password"
|
||||||
|
|
||||||
if($skip_certificate_validation){
|
if($skip_certificate_validation){
|
||||||
[System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$true}
|
[System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$true}
|
||||||
|
@ -56,8 +56,8 @@ $force = Get-Attr -obj $params -name "force" "yes" | ConvertTo-Bool
|
||||||
|
|
||||||
If ($force -or -not (Test-Path $dest)) {
|
If ($force -or -not (Test-Path $dest)) {
|
||||||
$client = New-Object System.Net.WebClient
|
$client = New-Object System.Net.WebClient
|
||||||
if($params.proxy_url) {
|
if($proxy_url) {
|
||||||
$proxy_url = $params.proxy_url
|
$proxy_server = New-Object System.Net.WebProxy($proxy_url, $true)
|
||||||
if($proxy_username -and $proxy_password){
|
if($proxy_username -and $proxy_password){
|
||||||
$proxy_credential = New-Object System.Net.NetworkCredential($proxy_username, $proxy_password)
|
$proxy_credential = New-Object System.Net.NetworkCredential($proxy_username, $proxy_password)
|
||||||
$proxy_server.Credentials = $proxy_credential
|
$proxy_server.Credentials = $proxy_credential
|
||||||
|
|
|
@ -70,22 +70,16 @@ options:
|
||||||
- The full URL of the proxy server to download through.
|
- The full URL of the proxy server to download through.
|
||||||
version_added: "2.0"
|
version_added: "2.0"
|
||||||
required: false
|
required: false
|
||||||
choices: null
|
|
||||||
default: null
|
|
||||||
proxy_username:
|
proxy_username:
|
||||||
description:
|
description:
|
||||||
- Proxy authentication username
|
- Proxy authentication username
|
||||||
version_added: "2.0"
|
version_added: "2.0"
|
||||||
required: false
|
required: false
|
||||||
choices: null
|
|
||||||
default: null
|
|
||||||
proxy_password:
|
proxy_password:
|
||||||
description:
|
description:
|
||||||
- Proxy authentication password
|
- Proxy authentication password
|
||||||
version_added: "2.0"
|
version_added: "2.0"
|
||||||
required: false
|
required: false
|
||||||
choices: null
|
|
||||||
default: null
|
|
||||||
author:
|
author:
|
||||||
- "Paul Durivage (@angstwad)"
|
- "Paul Durivage (@angstwad)"
|
||||||
- "Takeshi Kuramochi (tksarah)"
|
- "Takeshi Kuramochi (tksarah)"
|
||||||
|
|
Loading…
Reference in a new issue